Skip to content

Commit

Permalink
fix: report right command execution status (#5500)
Browse files Browse the repository at this point in the history
* fix: report right command execution status

* fix: handle sanitize filename issue

* chore: remove log statement and commented out code

---------

Co-authored-by: Daphne Yang <daphne.yang@salesforce.com>
Co-authored-by: peternhale <peternhale@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 15, 2024
1 parent af256bc commit e97f59f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
11 changes: 0 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/salesforcedx-vscode-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"@types/mocha": "^5",
"@types/node": "^18.11.9",
"@types/proxyquire": "1.3.28",
"@types/sanitize-filename": "^1.1.28",
"@types/shelljs": "^0.7.8",
"@types/sinon": "^2.3.7",
"@types/vscode": "^1.61.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ import {
import { SpawnOptions } from 'child_process';
import * as fs from 'fs';
import * as path from 'path';
import { Observable } from 'rxjs/Observable';
import sanitizeFilename from 'sanitize-filename';
import sanitize = require('sanitize-filename'); // NOTE: Do not follow the instructions in the Quick Fix to use the default import because that causes an error popup when you use Launch Extensions
import * as shell from 'shelljs';
import { URL } from 'url';
import * as vscode from 'vscode';
Expand Down Expand Up @@ -444,9 +443,9 @@ export class IsvDebugBootstrapExecutor extends SfdxCommandletExecutor<{}> {
) {
channelService.streamCommandOutput(execution);
channelService.showChannelOutput();
notificationService.reportExecutionError(
execution.command.toString(),
execution.stderrSubject as any as Observable<Error | undefined>
notificationService.reportCommandExecutionStatus(
execution,
cancellationToken
);
ProgressNotification.show(execution, cancellationTokenSource);
taskViewService.addCommandExecution(execution, cancellationTokenSource);
Expand Down Expand Up @@ -531,7 +530,7 @@ const parameterGatherer = new CompositeParametersGatherer(
forceIdeUrlGatherer.forceIdUrl &&
forceIdeUrlGatherer.forceIdUrl.orgName
) {
return sanitizeFilename(
return sanitize(
forceIdeUrlGatherer.forceIdUrl.orgName.replace(/[+]/g, '_')
);
}
Expand Down

0 comments on commit e97f59f

Please sign in to comment.