File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -552,6 +552,8 @@ export class NodeHost extends EventTarget implements RuntimeHost {
552552 cancellationToken,
553553 stdin : input ,
554554 ignoreError,
555+ env,
556+ isolateEnv,
555557 } = options || { }
556558 const trace = options ?. trace ?. startTraceDetails ( label || command )
557559 try {
@@ -583,6 +585,8 @@ export class NodeHost extends EventTarget implements RuntimeHost {
583585 stdin : input ? undefined : "ignore" ,
584586 stdout : [ "pipe" ] ,
585587 stderr : [ "pipe" ] ,
588+ env,
589+ extendEnv : ! isolateEnv ,
586590 }
587591 )
588592 trace ?. itemValue ( `exit code` , `${ exitCode } ` )
Original file line number Diff line number Diff line change @@ -108,9 +108,12 @@ export class GitClient implements Git {
108108 args : string | string [ ] ,
109109 options ?: { label ?: string }
110110 ) : Promise < string > {
111- const opts = {
111+ const opts : ShellOptions = {
112112 ...( options || { } ) ,
113113 cwd : this . cwd ,
114+ env : {
115+ LC_ALL : "en_US" ,
116+ } ,
114117 }
115118 const eargs = Array . isArray ( args ) ? args : shellParse ( args )
116119 dbg ( `exec` , shellQuote ( eargs ) )
Original file line number Diff line number Diff line change @@ -4236,7 +4236,9 @@ interface SgHost {
42364236
42374237interface ShellOptions {
42384238 cwd ?: string
4239+
42394240 stdin ?: string
4241+
42404242 /**
42414243 * Process timeout in milliseconds, default is 60s
42424244 */
@@ -4250,6 +4252,16 @@ interface ShellOptions {
42504252 * Ignore exit code errors
42514253 */
42524254 ignoreError ?: boolean
4255+
4256+ /**
4257+ * Additional environment variables to set for the process.
4258+ */
4259+ env ?: Record < string , string >
4260+
4261+ /**
4262+ * Inject the content of 'env' exclusively
4263+ */
4264+ isolateEnv ?: boolean
42534265}
42544266
42554267interface ShellOutput {
You can’t perform that action at this time.
0 commit comments