From: Stephen Smith Date: Thu, 21 Jul 2022 01:01:32 +0000 (-0400) Subject: 16070: Swap shell escaping library to improve command line display X-Git-Tag: 2.5.0~45^2~4 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/6ab5c8019be196ba0e7ff401f2734f181f4f7ced 16070: Swap shell escaping library to improve command line display Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- diff --git a/package.json b/package.json index a8b3ee81..9e663ca6 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@types/react-virtualized-auto-sizer": "1.0.0", "@types/react-window": "1.8.2", "@types/redux-form": "7.4.12", - "@types/shell-quote": "1.6.0", + "@types/shell-escape": "^0.2.0", "axios": "^0.21.1", "babel-core": "6.26.3", "babel-runtime": "6.26.0", @@ -71,7 +71,7 @@ "redux-thunk": "2.3.0", "reselect": "4.0.0", "set-value": "2.0.1", - "shell-quote": "1.6.1", + "shell-escape": "^0.2.0", "sinon": "7.3", "tslint": "5.20.0", "tslint-etc": "1.6.0", diff --git a/src/store/processes/process-command-actions.ts b/src/store/processes/process-command-actions.ts index 9dec9b30..d81a7c4d 100644 --- a/src/store/processes/process-command-actions.ts +++ b/src/store/processes/process-command-actions.ts @@ -6,7 +6,7 @@ import { dialogActions } from 'store/dialog/dialog-actions'; import { RootState } from 'store/store'; import { Dispatch } from 'redux'; import { getProcess } from 'store/processes/process'; -import { quote } from 'shell-quote'; +import shellescape from 'shell-escape'; export const PROCESS_COMMAND_DIALOG_NAME = 'processCommandDialog'; @@ -20,7 +20,7 @@ export const openProcessCommandDialog = (processUuid: string) => const process = getProcess(processUuid)(getState().resources); if (process) { const data: ProcessCommandDialogData = { - command: quote(process.containerRequest.command), + command: shellescape(process.containerRequest.command), processName: process.containerRequest.name, }; dispatch(dialogActions.OPEN_DIALOG({ id: PROCESS_COMMAND_DIALOG_NAME, data })); diff --git a/yarn.lock b/yarn.lock index 13ea553a..6dfb5b18 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2817,10 +2817,10 @@ __metadata: languageName: node linkType: hard -"@types/shell-quote@npm:1.6.0": - version: 1.6.0 - resolution: "@types/shell-quote@npm:1.6.0" - checksum: 5d9f4e35c8df32d9994f8ae2f1a1fe8a6b7ee96794f803e0904ceae7ad7255a214954e85cd75bd847fe77458d3746430522e87237438f223b7d72a23c4928c0e +"@types/shell-escape@npm:^0.2.0": + version: 0.2.0 + resolution: "@types/shell-escape@npm:0.2.0" + checksum: 020696ed313eeb02deb2abcc581e8b570be6f9ee662892339965b524bb4fbdc9a97b6520d914117740ec11147b0b1aa52358b8e03fa214c2da99743adb196853 languageName: node linkType: hard @@ -3600,13 +3600,6 @@ __metadata: languageName: node linkType: hard -"array-filter@npm:~0.0.0": - version: 0.0.1 - resolution: "array-filter@npm:0.0.1" - checksum: 0e9afdf5e248c45821c6fe1232071a13a3811e1902c2c2a39d12e4495e8b0b25739fd95bffbbf9884b9693629621f6077b4ae16207b8f23d17710fc2465cebbb - languageName: node - linkType: hard - "array-find-index@npm:^1.0.1": version: 1.0.2 resolution: "array-find-index@npm:1.0.2" @@ -3648,20 +3641,6 @@ __metadata: languageName: node linkType: hard -"array-map@npm:~0.0.0": - version: 0.0.0 - resolution: "array-map@npm:0.0.0" - checksum: 30d73fdc99956c8bd70daea40db5a7d78c5c2c75a03c64fc77904885e79adf7d5a0595076534f4e58962d89435f0687182ac929e65634e3d19931698cbac8149 - languageName: node - linkType: hard - -"array-reduce@npm:~0.0.0": - version: 0.0.0 - resolution: "array-reduce@npm:0.0.0" - checksum: d6226325271f477e3dd65b4d40db8597735b8d08bebcca4972e52d3c173d6c697533664fa8865789ea2d076bdaf1989bab5bdfbb61598be92074a67f13057c3a - languageName: node - linkType: hard - "array-union@npm:^1.0.1": version: 1.0.2 resolution: "array-union@npm:1.0.2" @@ -3769,7 +3748,7 @@ __metadata: "@types/redux-devtools": 3.0.44 "@types/redux-form": 7.4.12 "@types/redux-mock-store": 1.0.2 - "@types/shell-quote": 1.6.0 + "@types/shell-escape": ^0.2.0 "@types/sinon": 7.5 "@types/uuid": 3.4.4 axios: ^0.21.1 @@ -3829,7 +3808,7 @@ __metadata: redux-thunk: 2.3.0 reselect: 4.0.0 set-value: 2.0.1 - shell-quote: 1.6.1 + shell-escape: ^0.2.0 sinon: 7.3 ts-mock-imports: 1.3.7 tslint: 5.20.0 @@ -16502,15 +16481,10 @@ __metadata: languageName: node linkType: hard -"shell-quote@npm:1.6.1": - version: 1.6.1 - resolution: "shell-quote@npm:1.6.1" - dependencies: - array-filter: ~0.0.0 - array-map: ~0.0.0 - array-reduce: ~0.0.0 - jsonify: ~0.0.0 - checksum: 982a4fdf2d474f0dc40885de4222f100ba457d7c75d46b532bf23b01774b8617bc62522c6825cb1fa7dd4c54c18e9dcbae7df2ca8983101841b6f2e6a7cacd2f +"shell-escape@npm:^0.2.0": + version: 0.2.0 + resolution: "shell-escape@npm:0.2.0" + checksum: 0d87f1ae22ad22a74e148348ceaf64721e3024f83c90afcfb527318ce10ece654dd62e103dd89a242f2f4e4ce3cecdef63e3d148c40e5fabca8ba6c508f97d9f languageName: node linkType: hard