Skip to content

Commit b749cc1

Browse files
committed
partially refactor function returned by Run function (utility.ts)
1 parent d3ce72d commit b749cc1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/utility.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ export function Run(
9898

9999
if (output) {
100100
args.pop();
101-
let o = output[0];
102-
o = o.replace(/\//g, sep);
103-
o = o.replace(/\\/g, sep);
104-
o = o.replace(/"/g, '');
105-
o = normalize(o);
106-
args.push(o);
101+
args.push(
102+
normalize(output[0].replace(
103+
/(\/|\\|")/g,
104+
(match) => match === '"' ? '' : sep)
105+
)
106+
);
107107
}
108108

109109
if (switches.files) {

0 commit comments

Comments
 (0)