@@ -106,8 +106,6 @@ class GrainCommand extends commander.Command {
106106 num
107107 ) ;
108108 cmd . forwardOption ( "--import-memory" , "import the memory from `env.memory`" ) ;
109- cmd . option ( "--dir <dir...>" , "directory to preopen" ) ;
110- cmd . option ( "--env <env...>" , "WASI environment variables" ) ;
111109 cmd . forwardOption (
112110 "--elide-type-info" ,
113111 "don't include runtime type information used by toString/print"
@@ -176,6 +174,9 @@ program
176174 // `--version` should only be available on the default command
177175 . version ( pkgJson . version , "-v, --version" , "output the current version" )
178176 . forwardOption ( "-o <filename>" , "output filename" )
177+ . option ( "--dir <dir...>" , "directory to preopen" )
178+ . option ( "--env <env...>" , "WASI environment variables" )
179+
179180 . action ( function ( file , options , program ) {
180181 const success = exec . grainc ( file , options , program ) ;
181182 if ( success ) {
@@ -202,6 +203,8 @@ program
202203program
203204 . command ( "run <file>" )
204205 . description ( "run a wasm file via grain's WASI runner" )
206+ . option ( "--dir <dir...>" , "directory to preopen" )
207+ . option ( "--env <env...>" , "WASI environment variables" )
205208 . action ( ( ...args ) => exec . grainrun ( unprocessedArgs , ...args ) ) ;
206209
207210program
0 commit comments