Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Dmytro Nochevnov <[email protected]>
  • Loading branch information
dmytro-ndp committed Jan 1, 2025
1 parent 5b4e3fd commit 7ebbbab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/e2e/specs/api/QuarkusDevFileAPI.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ suite('Quarkus devfile API test', function (): void {
Logger.info(`workdir from exec section of DevWorkspace file: ${workdir}`);
Logger.info(`commandLine from exec section of DevWorkspace file: ${commandLine}`);

let runCommandInBash = '\"${commandLine}\"'.replaceAll('$', '\\$');
let runCommandInBash: string = '"${commandLine}"'.replaceAll('$', '\\$');

if (workdir !== undefined && workdir !== '') {
runCommandInBash = 'cd ${workdir} && ' + runCommandInBash;
Expand All @@ -92,9 +92,9 @@ suite('Quarkus devfile API test', function (): void {
Logger.info(`workdir from exec section of DevWorkspace file: ${workdir}`);
Logger.info(`commandLine from exec section of DevWorkspace file: ${commandLine}`);

let runCommandInBash = '\"${commandLine}\"'.replaceAll('$', '\\$');
let runCommandInBash: string = '"${commandLine}"'.replaceAll('$', '\\$');

if (workdir != undefined && workdir !== '') {
if (workdir !== undefined && workdir !== '') {
runCommandInBash = 'cd ${workdir} && ' + runCommandInBash;
}

Expand Down
4 changes: 1 addition & 3 deletions tests/e2e/utils/KubernetesCommandLineToolsExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ export class KubernetesCommandLineToolsExecutor implements IKubernetesCommandLin

Logger.debug(`${this.kubernetesCommandLineTool} - delete '${dwtName}' devWorkspaceTemplate`);

this.shellExecutor.executeCommand(
`${this.kubernetesCommandLineTool} delete dwt ${dwtName} -n ${this.namespace} || true`
);
this.shellExecutor.executeCommand(`${this.kubernetesCommandLineTool} delete dwt ${dwtName} -n ${this.namespace} || true`);

Check warning

Code scanning / CodeQL

Unsafe shell command constructed from library input Medium test

This string concatenation which depends on
library input
is later used in a
shell command
.
}

applyAndWaitDevWorkspace(yamlConfiguration: string): ShellString {
Expand Down

0 comments on commit 7ebbbab

Please sign in to comment.