File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 3535 - macos-latest
3636 - ubuntu-latest
3737 - windows-latest
38+
39+ smoke-test :
40+ runs-on : ubuntu-latest
41+ steps :
42+ - uses : actions/checkout@v4
43+ - uses : ./.github/actions/setup-environment
44+ - run : pnpm build
45+ - run : pnpm dlx ember-cli@latest new smoke-test-app -b @ember/app-blueprint --pnpm
46+ - run : node bin/gember.js component foo --cwd=smoke-test-app
47+ - run : cd smoke-test-app && pnpm test
Original file line number Diff line number Diff line change @@ -60,12 +60,12 @@ export function defineGenerator({
6060 name,
6161} : GeneratorOptions ) : Generator {
6262 const generatorName = name ;
63- const generatorArgs = [ copy ( ) , log ( ) , ...args ]
63+ const generatorArgs = [ copy ( ) , cwd ( ) , log ( ) , ...args ]
6464 . map ( ( argFactory ) => argFactory ( generatorName ) )
6565 . sort ( ( a , b ) => a . name . localeCompare ( b . name ) ) ;
6666
6767 async function run ( args : Args ) : Promise < void > {
68- const packagePath = cwd ( ) ;
68+ const packagePath = args . cwd ?? processCwd ( ) ;
6969 const packageJson : EmberPackageJson = await readJson (
7070 join ( packagePath , "package.json" ) ,
7171 ) ;
@@ -252,6 +252,14 @@ export function copy(): GeneratorArgFactory {
252252 } ) ;
253253}
254254
255+ export function cwd ( ) : GeneratorArgFactory {
256+ return ( ) => ( {
257+ description : "The current working directory to run the generator in" ,
258+ name : "cwd" ,
259+ type : "string" ,
260+ } ) ;
261+ }
262+
255263export function log ( ) : GeneratorArgFactory {
256264 return ( generatorName ) => ( {
257265 description : `Log the generated ${ generatorName } to the console, instead of writing it to disk` ,
You can’t perform that action at this time.
0 commit comments