Skip to content

Commit 452d480

Browse files
authored
Update App Update Script.js
double escape \n's
1 parent 2906544 commit 452d480

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Parsers/App Update Script.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function updateAvailable(grSSA) {
7070
return false;
7171
}
7272
if (appsArray.length > 0) {
73-
gs.info("\n\n------------------------------------------------\n\nLinks to track progress below the payload information\n\n(scroll down)\n\n-----------------------------------------------\n\n");
73+
gs.info("\\n\\n------------------------------------------------\\n\\nLinks to track progress below the payload information\\n\\n(scroll down)\\n\\n-----------------------------------------------\\n\\n");
7474
7575
var appsPackages = {};
7676
appsPackages.packages = appsArray;
@@ -81,30 +81,30 @@ if (appsArray.length > 0) {
8181
var update = new sn_appclient.AppUpgrader().installBatch(data);
8282
var updateObj = JSON.parse(update);
8383
gs.info(
84-
"\n\n------------------------------------------------\n\nOpen the Batch install link to monitor the installation progress. It may take some time for the apps to all populate in the related list. After all apps have populated the install will start and the State will change to In progress.\n\nBatch install:\n" +
84+
"\\n\\n------------------------------------------------\\n\\nOpen the Batch install link to monitor the installation progress. It may take some time for the apps to all populate in the related list. After all apps have populated the install will start and the State will change to In progress.\\n\\nBatch install:\\n" +
8585
baseUrl +
8686
"nav_to.do?uri=sys_batch_install_plan.do?sys_id=" +
8787
updateObj.batch_installation_id +
88-
"\n\nExecution tracker:\n" +
88+
"\\n\\nExecution tracker:\\n" +
8989
baseUrl +
9090
"nav_to.do?uri=sys_progress_worker.do?sys_id=" +
9191
updateObj.execution_tracker_id +
92-
"\n\n-----------------------------------------------\n\n"
92+
"\\n\\n-----------------------------------------------\\n\\n"
9393
);
9494
var grSBIP = new GlideRecord('sys_batch_install_plan');
9595
if (grSBIP.get(updateObj.batch_installation_id)) {
96-
grSBIP.setValue('notes','It may take some time for the apps to all populate in the related list below (you can refresh the list as needed to see them populating). \n\nAfter all apps have populated the install will start and the State (above) will change to In progress. \n\nWhen the batch is done the state will update to Installed');
96+
grSBIP.setValue('notes','It may take some time for the apps to all populate in the related list below (you can refresh the list as needed to see them populating). \\n\\nAfter all apps have populated the install will start and the State (above) will change to In progress. \\n\\nWhen the batch is done the state will update to Installed');
9797
grSBIP.update();
9898
}
9999
} else {
100100
gs.info(
101-
"\n\n-----------------------------------------------\n\nAll apps appear to be up-to-date. \n\nIf you think this is incorrect please try running this script again with \`updateCheck\` set to \`true\`. This will check the store for any new updates.\n(sometimes there are apps in the Application Manager that say that there are updates but you can't actually update them)\n\n-----------------------------------------------\n\n"
101+
"\\n\\n-----------------------------------------------\\n\\nAll apps appear to be up-to-date. \\n\\nIf you think this is incorrect please try running this script again with \`updateCheck\` set to \`true\`. This will check the store for any new updates.\\n(sometimes there are apps in the Application Manager that say that there are updates but you can't actually update them)\\n\\n-----------------------------------------------\\n\\n"
102102
);
103103
}
104104
105105
\`\`\`
106106
`;
107107

108-
const message = "<@U6E2TEKQ9> made a cool script for bulk updating apps!\n\n" + eric_script;
108+
const message = "<@U6E2TEKQ9> made a cool script for bulk updating apps!\\n\\n" + eric_script;
109109

110110
new x_snc_slackerbot.Slacker().send_chat(current, message, true);

0 commit comments

Comments
 (0)