-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 #3142: undecorate: allow white spaces in cwd #3145
Conversation
🦋 Changeset detectedLatest commit: 70ca189 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -58,7 +57,7 @@ test("run cli with --parseTsAsNonJsx #2754", () => { | |||
} | |||
`) | |||
|
|||
mkdirSync(dirname(testNonJsxFile)) | |||
mkdirSync(dirname(testNonJsxFile), { recursive: true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recursive: true
just to silent the EEXIST error, which prevents re-running test without manually deleting the directory first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that has become the default on Node a while back IIRC, so you might be on an older version? Anyway, no harm in there.
@@ -107,11 +107,11 @@ function interpret_cli_args() { | |||
spawnBin("jscodeshift", [ | |||
"--extensions=js,jsx,ts,tsx", | |||
...process.argv.filter(arg => arg.startsWith("--")), | |||
"-t", path.join(__dirname, "src", "undecorate.ts"), | |||
|
|||
"-t", `"${path.join(__dirname, "src", "undecorate.ts")}"`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh, I was hoping this was the exact problem that passing an argument array would fix. Anyway, thanks for finding this!
Fixes #3142