Skip to content
This repository was archived by the owner on Sep 11, 2021. It is now read-only.

Ensure consistent return type from setEnvironment #183

Merged
merged 1 commit into from
Apr 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const debug = require('debug')('windows-build-tools');
*
* @params variables an object with paths for different environmental variables
*/
export function setEnvironment(env: InstallationDetails) {
export function setEnvironment(env: InstallationDetails): Promise<void> {
const scriptPath = IS_DRY_RUN
? path.join(__dirname, '..', 'ps1', 'dry-run.ps1')
: path.join(__dirname, '..', 'ps1', 'set-environment.ps1');
Expand Down Expand Up @@ -45,7 +45,8 @@ export function setEnvironment(env: InstallationDetails) {
log(chalk.bold.green(`Now configuring the Visual Studio Build Tools..`));
} else {
log(chalk.bold.green(`Skipping configuration: No configuration for Python or Visual Studio Build Tools required.`));
return;
return(new Promise((resolve, reject) => resolve()))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.then(() => log(chalk.bold.green(`\nAll done!\n`)));
}

const maybeArgs = `${pythonArguments}${buildArguments}`;
Expand Down