Skip to content

Commit

Permalink
fix execAsync type error
Browse files Browse the repository at this point in the history
  • Loading branch information
ejnshtein committed Jun 7, 2022
1 parent 1ecdf56 commit bd5a632
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 0 additions & 10 deletions build-packages/magento-scripts/lib/util/exec-async-command.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ export function execAsyncSpawn (
options?: ExecAsyncSpawnOptions<true>
): Promise<{ code: number, result: string }>;

/**
* Execute bash command
* @param command Bash command
* @param options Child process exec options ([docs](https://nodejs.org/dist/latest-v14.x/docs/api/child_process.html#child_process_child_process_exec_command_options_callback))
*/
export function execAsync(
command: string,
options?: { encoding: BufferEncoding } & ExecOptions
): Promise<string>

export function execCommandTask(
command: string,
options?: Omit<ExecAsyncSpawnOptions<false>, 'callback'>
Expand Down
10 changes: 10 additions & 0 deletions build-packages/magento-scripts/lib/util/exec-async.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint-disable max-len */
/**
* Execute bash command
* @param command Bash command
* @param options Child process exec options ([docs](https://nodejs.org/dist/latest-v14.x/docs/api/child_process.html#child_process_child_process_exec_command_options_callback))
*/
export function execAsync(
command: string,
options?: { encoding: BufferEncoding } & ExecOptions
): Promise<string>
2 changes: 1 addition & 1 deletion build-packages/magento-scripts/lib/util/open-browser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { execAsync } = require('./exec-async-command');
const { execAsync } = require('./exec-async');

const openBrowser = async (url) => {
const start = process.platform === 'darwin' ? 'open' : 'xdg-open';
Expand Down

0 comments on commit bd5a632

Please sign in to comment.