File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
packages/cli/src/commands Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @trigger.dev/cli " : patch
3+ ---
4+
5+ fix: init will no longer fail when outside of a git repo
Original file line number Diff line number Diff line change @@ -253,9 +253,19 @@ const resolveOptionsWithPrompts = async (
253253// Detects if there are any uncommitted git changes at path
254254async function detectGitChanges ( path : string ) : Promise < boolean > {
255255 const git = simpleGit ( path ) ;
256- const status = await git . status ( ) ;
257256
258- return status . files . length > 0 ;
257+ try {
258+ const isRepo = await git . checkIsRepo ( ) ;
259+
260+ if ( isRepo ) {
261+ // Check if there are uncommitted changes
262+ const status = await git . status ( ) ;
263+ return status . files . length > 0 ;
264+ }
265+ return false ;
266+ } catch ( error ) {
267+ return false ;
268+ }
259269}
260270
261271async function detectTypescriptProject ( path : string ) : Promise < boolean > {
You can’t perform that action at this time.
0 commit comments