Skip to content

Commit

Permalink
fix(importer): check updateScripts value at script install vs deps re…
Browse files Browse the repository at this point in the history
…moval
  • Loading branch information
anulman authored and MarshallOfSound committed Feb 7, 2017
1 parent 9dcf2ec commit 4942cb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default async (providedOptions = {}) => {
} else if (buildToolPackages[key]) {
const explanation = buildToolPackages[key];
// eslint-disable-next-line max-len
const shouldRemoveDependency = await confirmIfInteractive(interactive, `Do you want us to remove the "${key}" dependency in package.json? Electron Forge ${explanation}.`, updateScripts);
const shouldRemoveDependency = await confirmIfInteractive(interactive, `Do you want us to remove the "${key}" dependency in package.json? Electron Forge ${explanation}.`);

if (shouldRemoveDependency) {
delete packageJSON.dependencies[key];
Expand All @@ -116,7 +116,7 @@ export default async (providedOptions = {}) => {
const updatePackageScript = async (scriptName, newValue) => {
if (packageJSON.scripts[scriptName] !== newValue) {
// eslint-disable-next-line max-len
const shouldUpdate = await confirmIfInteractive(interactive, `Do you want us to update the "${scriptName}" script to instead call the electron-forge task "${newValue}"`);
const shouldUpdate = await confirmIfInteractive(interactive, `Do you want us to update the "${scriptName}" script to instead call the electron-forge task "${newValue}"`, updateScripts);
if (shouldUpdate) {
packageJSON.scripts[scriptName] = newValue;
}
Expand Down

0 comments on commit 4942cb6

Please sign in to comment.