Skip to content

Commit 6c14596

Browse files
author
Matthias Leutenegger
committed
change: init now relies on config.platform for composer
1 parent ea55ebd commit 6c14596

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

cli.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ require('yargs') // eslint-disable-line
135135
describe: 'specify the recipe to be used',
136136
default: 'syntro/ssto:^1',
137137
type: 'string',
138+
}).option('ignore-platform-reqs', {
139+
type: 'boolean',
140+
description: 'If set, the flag is added to the composer commant. Use of this flag is discouraged, use the composer "config.platform" key.',
138141
});
139142
yargs.positional('path', {
140143
describe: 'where to place the project',

commands/init.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ function init(args) {
2525
...command,
2626
'composer',
2727
'create-project',
28-
'--ignore-platform-reqs --no-interaction',
28+
'--no-interaction',
29+
];
30+
if (args['ignore-platform-reqs']) {
31+
command = [
32+
...command,
33+
'--ignore-platform-reqs',
34+
];
35+
}
36+
command = [
37+
...command,
2938
args.recipe,
3039
args.path,
3140
];

0 commit comments

Comments
 (0)