mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Change directory to cwd before running git user setup. (#161)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@changesets/action": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Change directory to `cwd` before running git user setup. This fixes an issue when the action starts its execution not in a git repository.
|
||||||
+6
-6
@@ -14,6 +14,12 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const inputCwd = core.getInput("cwd");
|
||||||
|
if (inputCwd) {
|
||||||
|
console.log("changing directory to the one given as the input");
|
||||||
|
process.chdir(inputCwd);
|
||||||
|
}
|
||||||
|
|
||||||
let setupGitUser = core.getBooleanInput("setupGitUser");
|
let setupGitUser = core.getBooleanInput("setupGitUser");
|
||||||
|
|
||||||
if (setupGitUser) {
|
if (setupGitUser) {
|
||||||
@@ -27,12 +33,6 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
|
|||||||
`machine github.com\nlogin github-actions[bot]\npassword ${githubToken}`
|
`machine github.com\nlogin github-actions[bot]\npassword ${githubToken}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const inputCwd = core.getInput("cwd");
|
|
||||||
if (inputCwd) {
|
|
||||||
console.log("changing directory to the one given as the input");
|
|
||||||
process.chdir(inputCwd);
|
|
||||||
}
|
|
||||||
|
|
||||||
let { changesets } = await readChangesetState();
|
let { changesets } = await readChangesetState();
|
||||||
|
|
||||||
let publishScript = core.getInput("publish");
|
let publishScript = core.getInput("publish");
|
||||||
|
|||||||
Reference in New Issue
Block a user