diff --git a/packages/pulumi/src/executors/preview/preview.impl.ts b/packages/pulumi/src/executors/preview/preview.impl.ts index 9fa48ebc..874c3610 100644 --- a/packages/pulumi/src/executors/preview/preview.impl.ts +++ b/packages/pulumi/src/executors/preview/preview.impl.ts @@ -1,8 +1,8 @@ import { ExecutorContext, workspaceRoot } from '@nx/devkit' import { buildCommand } from '@nx-extend/core' import { execSync } from 'child_process' -import { which } from 'shelljs' import { join } from 'path' +import { which } from 'shelljs' export interface PreviewOptions { stack?: string @@ -19,17 +19,14 @@ export default async function creatExecutor( const { sourceRoot } = context.workspace.projects[context.projectName] - execSync( - buildCommand([ - 'PULUMI_EXPERIMENTAL=true', - 'pulumi preview --diff --suppress-progress', - options.stack && `--stack=${options.stack}` - ]), - { - cwd: join(workspaceRoot, options.root ?? sourceRoot), - stdio: 'inherit' - } - ) + execSync(buildCommand([ + 'PULUMI_EXPERIMENTAL=true', + 'pulumi preview --diff --suppress-progress', + options.stack && `--stack=${options.stack}` + ]), { + cwd: join(workspaceRoot, options.root ?? sourceRoot), + stdio: 'inherit' + }) - return Promise.resolve({ success: true }) + return { success: true } } diff --git a/packages/pulumi/src/executors/refresh/refresh.impl.ts b/packages/pulumi/src/executors/refresh/refresh.impl.ts index 8f5424f7..7f2e6bec 100644 --- a/packages/pulumi/src/executors/refresh/refresh.impl.ts +++ b/packages/pulumi/src/executors/refresh/refresh.impl.ts @@ -21,19 +21,16 @@ export default async function createExecutor( const { sourceRoot } = context.workspace.projects[context.projectName] - execSync( - buildCommand([ - 'PULUMI_EXPERIMENTAL=true', - 'pulumi refresh --suppress-progress', - options.stack && `--stack=${options.stack}`, - options.skipPreview && '--skip-preview', - options.yes && '--yes' - ]), - { - cwd: join(workspaceRoot, options.root ?? sourceRoot), - stdio: 'inherit' - } - ) + execSync(buildCommand([ + 'PULUMI_EXPERIMENTAL=true', + 'pulumi refresh --suppress-progress', + options.stack && `--stack=${options.stack}`, + options.skipPreview && '--skip-preview', + options.yes && '--yes' + ]), { + cwd: join(workspaceRoot, options.root ?? sourceRoot), + stdio: 'inherit' + }) - return Promise.resolve({ success: true }) + return { success: true } } diff --git a/packages/pulumi/src/executors/up/up.impl.ts b/packages/pulumi/src/executors/up/up.impl.ts index b5656317..1069cc2c 100644 --- a/packages/pulumi/src/executors/up/up.impl.ts +++ b/packages/pulumi/src/executors/up/up.impl.ts @@ -23,21 +23,18 @@ export default async function createExecutor( const { sourceRoot } = context.workspace.projects[context.projectName] - execSync( - buildCommand([ - 'pulumi up --suppress-progress', - options.stack && `--stack=${options.stack}`, - options.skipPreview && '--skip-preview', - options.yes && '--yes', - options.suppressOutputs && '--suppress-outputs', - USE_VERBOSE_LOGGING_MINIMAL && '--debug', - options.json && '--json' - ]), - { - cwd: join(workspaceRoot, options.root ?? sourceRoot), - stdio: 'inherit' - } - ) + execSync(buildCommand([ + 'pulumi up --suppress-progress', + options.stack && `--stack=${options.stack}`, + options.skipPreview && '--skip-preview', + options.yes && '--yes', + options.suppressOutputs && '--suppress-outputs', + USE_VERBOSE_LOGGING_MINIMAL && '--debug', + options.json && '--json' + ]), { + cwd: join(workspaceRoot, options.root ?? sourceRoot), + stdio: 'inherit' + }) - return Promise.resolve({ success: true }) + return { success: true } }