Skip to content

Commit 4c2263b

Browse files
committed
Handle better install results
Signed-off-by: worksofliam <[email protected]>
1 parent af0c6c0 commit 4c2263b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/connection/serverComponent.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ export class ServerComponent {
107107
command: `echo ${ExecutablePathDir}`
108108
});
109109

110-
if (commandResult.code === 0 && commandResult.stderr === ``) {
110+
this.writeOutput(JSON.stringify(commandResult));
111+
112+
if (commandResult.code === 0) {
113+
const stuffInStderr = commandResult.stderr.length > 0;
111114
const remotePath = path.posix.join(commandResult.stdout, basename);
112115

113116
ServerComponent.writeOutput(JSON.stringify({remotePath, ExecutablePathDir}));
@@ -122,14 +125,17 @@ export class ServerComponent {
122125

123126
await Config.setServerComponentName(basename);
124127

128+
if (stuffInStderr) {
129+
ServerComponent.writeOutput(`Server component was uploaded to ${remotePath} but there was something in stderr, which is not right. It might be worth seeing your user profile startup scripts.`);
130+
}
131+
125132
window.showInformationMessage(`Db2 for IBM i extension server component has been updated!`);
126133
this.installed = true;
127134
updateResult = UpdateStatus.JUST_UPDATED;
128135

129136
} else {
130137
updateResult = UpdateStatus.FAILED;
131138

132-
this.writeOutput(JSON.stringify(commandResult));
133139
window.showErrorMessage(`Something went really wrong when trying to fetch your home directory.`).then(chosen => {
134140
if (chosen === `Show`) {
135141
this.outputChannel.show();

0 commit comments

Comments
 (0)