Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: windows support for cca #205

Merged
merged 1 commit into from
Sep 23, 2024
Merged

fix: windows support for cca #205

merged 1 commit into from
Sep 23, 2024

Conversation

NorOldBurden
Copy link
Contributor

No description provided.

@@ -166,7 +166,7 @@ export const createGitApp = (repo: string, version: string) => {


// Construct the file path
const relativeFilePath = templateFile.split(join(folderName, template) + sep)[1];
const relativeFilePath = templateFile.split((join(folderName, template) + '/').replace(/\\/g,'/'))[1];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this to the util and use it everywhere please

const posixPath = require('path').posix;

function toPosixPath(mixedPath) {
return mixedPath.replace(/\/g, posixPath.sep);
}

@@ -196,7 +196,7 @@ export const createGitApp = (repo: string, version: string) => {
const closestPkgJson = []
.concat(glob(join(currentDirectory, name, '**', 'package.json')))
.reduce((shortest, current) => {
return current.split(sep).length < shortest.split(sep).length ? current : shortest;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to use the constant sep from 'const posixPath = require('path').posix;'

@@ -130,3 +131,7 @@ export const getPackageLicAndAccessInfo = async (results) => {
};
}

export const glob = (input) => {
return globSync(input.replace(/\\/g,'/'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's put a comment here — something about windows support.

@NorOldBurden NorOldBurden force-pushed the fix/windows-support branch 4 times, most recently from 035954c to 2c6eae2 Compare September 12, 2024 03:02
@Zetazzz Zetazzz merged commit be6f91a into main Sep 23, 2024
0 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants