File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @changesets/action " : patch
3+ ---
4+
5+ Change directory to ` cwd ` before running git user setup. This fixes an issue when the action starts its execution not in a git repository.
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
1414 return ;
1515 }
1616
17+ const inputCwd = core . getInput ( "cwd" ) ;
18+ if ( inputCwd ) {
19+ console . log ( "changing directory to the one given as the input" ) ;
20+ process . chdir ( inputCwd ) ;
21+ }
22+
1723 let setupGitUser = core . getBooleanInput ( "setupGitUser" ) ;
1824
1925 if ( setupGitUser ) {
@@ -27,12 +33,6 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
2733 `machine github.com\nlogin github-actions[bot]\npassword ${ githubToken } `
2834 ) ;
2935
30- const inputCwd = core . getInput ( "cwd" ) ;
31- if ( inputCwd ) {
32- console . log ( "changing directory to the one given as the input" ) ;
33- process . chdir ( inputCwd ) ;
34- }
35-
3636 let { changesets } = await readChangesetState ( ) ;
3737
3838 let publishScript = core . getInput ( "publish" ) ;
You can’t perform that action at this time.
0 commit comments