Skip to content

Commit 30cd61e

Browse files
committed
use execa Options
1 parent a234d1b commit 30cd61e

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

packages/cli-core/src/package-manager-controller/package_manager_controller_base.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { existsSync as _existsSync } from 'fs';
22
import _fsp from 'fs/promises';
3-
import { ExecaChildProcess, execa as _execa } from 'execa';
3+
import { ExecaChildProcess, type Options, execa as _execa } from 'execa';
44
import * as _path from 'path';
55
import { type PackageManagerController } from '@aws-amplify/plugin-types';
66
import { LogLevel } from '../printer/printer.js';
@@ -123,13 +123,7 @@ Get started by running \`${this.binaryRunner} amplify sandbox\`.`;
123123
runWithPackageManager(
124124
args: string[] = [],
125125
dir: string,
126-
options?: {
127-
env?: Record<string, string>;
128-
stdin?: 'inherit' | 'pipe' | 'ignore';
129-
stdout?: 'inherit' | 'pipe' | 'ignore';
130-
stderr?: 'inherit' | 'pipe' | 'ignore';
131-
extendEnv?: boolean;
132-
}
126+
options?: Options
133127
): ExecaChildProcess<string> {
134128
return this.executeWithDebugLogger(
135129
dir,

packages/integration-tests/src/process-controller/process_controller.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,7 @@ export const runWithPackageManager = (
172172
packageManager: PackageManager,
173173
args: string[] = [],
174174
dir: string,
175-
options?: {
176-
env?: Record<string, string>;
177-
}
175+
options?: Options
178176
): ProcessController => {
179177
let packageManagerBinary: PackageManagerExecutable;
180178
switch (packageManager) {

packages/plugin-types/src/package_manager_controller.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* execa v8 doesn't support commonjs, so we need to use the types from v5
44
* https://github.com/sindresorhus/execa/issues/489#issuecomment-1109983390
55
*/
6-
import { type ExecaChildProcess } from 'execa';
6+
import { type ExecaChildProcess, type Options } from 'execa';
77

88
export type DependencyType = 'dev' | 'prod';
99

@@ -19,12 +19,6 @@ export type PackageManagerController = {
1919
runWithPackageManager: (
2020
args: string[] | undefined,
2121
dir: string,
22-
options?: {
23-
env?: Record<string, string>;
24-
stdin?: 'inherit' | 'pipe' | 'ignore';
25-
stdout?: 'inherit' | 'pipe' | 'ignore';
26-
stderr?: 'inherit' | 'pipe' | 'ignore';
27-
extendEnv?: boolean;
28-
}
22+
options?: Options
2923
) => ExecaChildProcess<string>;
3024
};

0 commit comments

Comments
 (0)