Skip to content

Commit eb0d410

Browse files
authored
Merge pull request #243 from OfficeDev/user/millerds/preinstall-convert-req-package
Preinstall convert requred package and keep sign in/out scripts
2 parents 8be40a6 + 876277b commit eb0d410

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

convertToSingleHost.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,6 @@ async function updatePackageJsonForXMLManifest() {
153153
const data = await readFileAsync(packageJson, "utf8");
154154
let content = JSON.parse(data);
155155

156-
// Remove scripts that are only used with JSON manifest
157-
delete content.scripts["signin"];
158-
delete content.scripts["signout"];
159-
160156
// Write updated JSON to file
161157
await writeFileAsync(packageJson, JSON.stringify(content, null, 2));
162158
}
@@ -265,9 +261,10 @@ if (projectName) {
265261
const cmdLine = `npx office-addin-manifest modify ${manifestPath} -g ${appId} -d ${projectName}`;
266262
childProcess.exec(cmdLine, (error, stdout) => {
267263
if (error) {
268-
Promise.reject(stdout);
264+
console.error(`Error updating the manifest: ${error}`);
265+
process.exitCode = 1;
269266
} else {
270-
Promise.resolve();
267+
console.log(stdout);
271268
}
272269
});
273270
}

0 commit comments

Comments
 (0)