@@ -105,10 +105,11 @@ export function createCaptureCommand(): Command {
105105 gitStatus = execSync ( 'git status --short' , {
106106 encoding : 'utf-8' ,
107107 cwd : projectRoot ,
108+ stdio : [ 'pipe' , 'pipe' , 'pipe' ] ,
108109 } ) ;
109110 hasChanges = gitStatus . trim ( ) . length > 0 ;
110111 } catch {
111- console . log ( '⚠️ Not in a git repository' ) ;
112+ // Not a git repository - silently skip git operations
112113 }
113114
114115 // 2. Commit if there are changes and not skipped
@@ -250,16 +251,18 @@ export function createCaptureCommand(): Command {
250251 const branch = execSync ( 'git rev-parse --abbrev-ref HEAD' , {
251252 encoding : 'utf-8' ,
252253 cwd : projectRoot ,
254+ stdio : [ 'pipe' , 'pipe' , 'pipe' ] ,
253255 } ) . trim ( ) ;
254256
255257 const lastCommit = execSync ( 'git log -1 --oneline' , {
256258 encoding : 'utf-8' ,
257259 cwd : projectRoot ,
260+ stdio : [ 'pipe' , 'pipe' , 'pipe' ] ,
258261 } ) . trim ( ) ;
259262
260263 gitInfo = `\nGit Status:\n Branch: ${ branch } \n Last commit: ${ lastCommit } \n` ;
261264 } catch {
262- // Ignore git errors
265+ // Not a git repository - silently ignore
263266 }
264267
265268 // 5. Check for any blockers or notes
@@ -326,6 +329,7 @@ Generated by stackmemory capture at ${timestamp}
326329 branch = execSync ( 'git rev-parse --abbrev-ref HEAD' , {
327330 encoding : 'utf-8' ,
328331 cwd : projectRoot ,
332+ stdio : [ 'pipe' , 'pipe' , 'pipe' ] ,
329333 } ) . trim ( ) ;
330334 } catch {
331335 // Not a git repo
@@ -434,13 +438,14 @@ export function createRestoreCommand(): Command {
434438 try {
435439 const gitStatus = execSync ( 'git status --short' , {
436440 encoding : 'utf-8' ,
441+ stdio : [ 'pipe' , 'pipe' , 'pipe' ] ,
437442 } ) . trim ( ) ;
438443 if ( gitStatus ) {
439- console . log ( '\n⚠️ Current uncommitted changes:' ) ;
444+ console . log ( '\n Current uncommitted changes:' ) ;
440445 console . log ( gitStatus ) ;
441446 }
442447 } catch {
443- // Not a git repo
448+ // Not a git repo - silently ignore
444449 }
445450
446451 // Copy to clipboard unless disabled
@@ -563,13 +568,14 @@ async function captureHandoff(
563568 const gitStatus = execSync ( 'git status --short' , {
564569 encoding : 'utf-8' ,
565570 cwd : projectRoot ,
571+ stdio : [ 'pipe' , 'pipe' , 'pipe' ] ,
566572 } ) . trim ( ) ;
567573 if ( gitStatus ) {
568574 console . log ( '\nYou have uncommitted changes' ) ;
569575 console . log ( ' Run "git status" to review' ) ;
570576 }
571577 } catch {
572- // Not a git repo or git not available
578+ // Not a git repo - silently ignore
573579 }
574580
575581 console . log ( '\nRun "stackmemory restore" in your next session' ) ;
0 commit comments