@@ -151,6 +151,13 @@ it.layer(layerTest, { excludeTestServices: true })("WorkspaceFileSystemLive", (i
151151 const nodeScript =
152152 "#!/opt/python-tools/bin/node --conditions=python\nconsole.log('hello')\n" ;
153153 yield * writeTextFile ( cwd , "run-node" , nodeScript ) ;
154+ const envNodeScript =
155+ "#!/usr/bin/env -S LABEL='python script' node --conditions=python\nconsole.log('hello')\n" ;
156+ yield * writeTextFile ( cwd , "run-env-node" , envNodeScript ) ;
157+ const envSplitStringScript = "#!/usr/bin/env --split-string=node\nconsole.log('hello')\n" ;
158+ yield * writeTextFile ( cwd , "run-env-split-string" , envSplitStringScript ) ;
159+ const envUnsetScript = "#!/usr/bin/env -u FOO node\nconsole.log('hello')\n" ;
160+ yield * writeTextFile ( cwd , "run-env-unset" , envUnsetScript ) ;
154161 const image = path . join ( cwd , "image" ) ;
155162 yield * fs . writeFile (
156163 image ,
@@ -162,11 +169,22 @@ it.layer(layerTest, { excludeTestServices: true })("WorkspaceFileSystemLive", (i
162169 yield * fs . writeFile ( archive , emptyZip ) ;
163170 expect (
164171 ( yield * service . getMetadata ( {
165- paths : [ path . join ( cwd , "run" ) , path . join ( cwd , "run-node" ) , image , archive ] ,
172+ paths : [
173+ path . join ( cwd , "run" ) ,
174+ path . join ( cwd , "run-node" ) ,
175+ path . join ( cwd , "run-env-node" ) ,
176+ path . join ( cwd , "run-env-split-string" ) ,
177+ path . join ( cwd , "run-env-unset" ) ,
178+ image ,
179+ archive ,
180+ ] ,
166181 } ) ) . entries ,
167182 ) . toEqual ( [
168183 { kind : "file" , byteLength : script . length , mimeType : "text/x-python" } ,
169184 { kind : "file" , byteLength : nodeScript . length , mimeType : "text/javascript" } ,
185+ { kind : "file" , byteLength : envNodeScript . length , mimeType : "text/javascript" } ,
186+ { kind : "file" , byteLength : envSplitStringScript . length , mimeType : "text/javascript" } ,
187+ { kind : "file" , byteLength : envUnsetScript . length , mimeType : "text/javascript" } ,
170188 { kind : "file" , byteLength : 8 , mimeType : "image/png" } ,
171189 { kind : "file" , byteLength : 22 , mimeType : "application/zip" } ,
172190 ] ) ;
0 commit comments