Skip to content

Commit

Permalink
Temporarily disable env var arguments for boolean default-true/exclus…
Browse files Browse the repository at this point in the history
…ive flags

Apparently these never worked anyway for boolean flags before oclif 1.16.1.
Then they started working, but only to specify true; otherwise, they
essentially force a false as though it were specified.

More details: oclif/core#536
  • Loading branch information
amcaplan committed Oct 24, 2022
1 parent 8687463 commit f4775a7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions packages/app/src/cli/commands/app/dev.ts
Expand Up @@ -58,17 +58,19 @@ export default class Dev extends Command {
env: 'SHOPIFY_FLAG_TUNNEL_URL',
exclusive: ['no-tunnel', 'tunnel'],
}),
// eslint-disable-next-line rulesdir/command-flags-with-env
'no-tunnel': Flags.boolean({
hidden: true,
description: 'Automatic creation of a tunnel is disabled. Service entry point will listen to localhost instead',
env: 'SHOPIFY_FLAG_NO_TUNNEL',
// env: 'SHOPIFY_FLAG_NO_TUNNEL',
default: false,
exclusive: ['tunnel-url', 'tunnel'],
}),
// eslint-disable-next-line rulesdir/command-flags-with-env
tunnel: Flags.boolean({
hidden: false,
description: 'Use ngrok to create a tunnel to your service entry point',
env: 'SHOPIFY_FLAG_TUNNEL',
// env: 'SHOPIFY_FLAG_TUNNEL',
default: true,
exclusive: ['tunnel-url', 'no-tunnel'],
}),
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-hydrogen/src/cli/commands/hydrogen/build.ts
Expand Up @@ -18,9 +18,10 @@ export default class Build extends Command {
description: ' the public path when served in production',
env: 'SHOPIFY_FLAG_BUILD_BASE',
}),
// eslint-disable-next-line rulesdir/command-flags-with-env
client: Flags.boolean({
description: 'build the client code',
env: 'SHOPIFY_FLAG_BUILD_CLIENT',
// env: 'SHOPIFY_FLAG_BUILD_CLIENT',
allowNo: true,
default: true,
}),
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-hydrogen/src/cli/commands/hydrogen/deploy.ts
Expand Up @@ -29,8 +29,9 @@ export default class Deploy extends Command {
env: 'SHOPIFY_HYDROGEN_FLAG_PATH_TO_BUILD',
description: 'Skip build process and use provided value as build',
}),
// eslint-disable-next-line rulesdir/command-flags-with-env
healthCheck: Flags.boolean({
env: 'SHOPIFY_HYDROGEN_FLAG_HEALTH_CHECK',
// env: 'SHOPIFY_HYDROGEN_FLAG_HEALTH_CHECK',
default: true,
description: 'Require a health check before the deployment succeeds.',
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-hydrogen/src/cli/flags.ts
Expand Up @@ -10,7 +10,7 @@ export const hydrogenFlags = {
hidden: true,
default: true,
description: 'should install packages',
env: 'SHOPIFY_HYDROGEN_FLAG_INSTALL',
// env: 'SHOPIFY_HYDROGEN_FLAG_INSTALL',
allowNo: true,
}),
}

0 comments on commit f4775a7

Please sign in to comment.