forked from badassery/laravel-up
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(commands/up): task composer install on run 'lvl up'
Composer install task added on `lvl up` command run. fix badassery#13
- Loading branch information
1 parent
dee6486
commit f650931
Showing
3 changed files
with
39 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import * as shelljs from "shelljs"; | ||
|
||
/** | ||
* Async version of shelljs.exec to resolve callback function output | ||
* @param command Command String | ||
* @param options Shelljs Execution Option | ||
*/ | ||
export const execAsync = (command: string, options: shelljs.ExecOptions = {}) => | ||
new Promise<{ stdout: string; stderr: string }>((resolve, reject) => { | ||
shelljs.exec(command, options, (code, stdout, stderr) => { | ||
if (code != 0) return reject(new Error(stderr)); | ||
return resolve({ stdout, stderr }); | ||
}); | ||
}); |