Skip to content

Commit

Permalink
feat(pulumi): Support --yes and --skipPreview options (#143)
Browse files Browse the repository at this point in the history
Fixes #142.

Marked as draft, as I am not sure how to test it. If you think it's okay
to merge without testing, let me know.
  • Loading branch information
TriPSs authored Aug 23, 2023
2 parents d7c7089 + facade9 commit 0b6c7f9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/pulumi/src/executors/up/up.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { execSync } from 'child_process'
import { which } from 'shelljs'

export interface UpOptions {
stack?: string
stack?: string,
skipPreview?: boolean,
yes?: boolean
}

export default async function creatExecutor(
Expand All @@ -18,7 +20,12 @@ export default async function creatExecutor(
const { sourceRoot } = context.workspace.projects[context.projectName]

execSync(
buildCommand(['pulumi up', options.stack && `--stack=${options.stack}`]),
buildCommand([
'pulumi up',
options.stack && `--stack=${options.stack}`,
options.skipPreview && '--skip-preview',
options.yes && '--yes'
]),
{
cwd: sourceRoot,
stdio: 'inherit'
Expand Down

0 comments on commit 0b6c7f9

Please sign in to comment.