fix double quote escape in path selector
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6207de8e5b
commit
c0eb113036
@ -21,7 +21,8 @@ export class PathType extends TypeValidation {
|
|||||||
if (typeof value !== 'string')
|
if (typeof value !== 'string')
|
||||||
throw new Error (`invalid type for ${this.option_type}`);
|
throw new Error (`invalid type for ${this.option_type}`);
|
||||||
|
|
||||||
const escaped = value.replace (/\\$/u, '');
|
const escaped = value.replace (/\\$/u, '')
|
||||||
|
.replace (/"$/u, '');
|
||||||
if (!await fs.pathExists (escaped))
|
if (!await fs.pathExists (escaped))
|
||||||
throw new Error ('path does not exist');
|
throw new Error ('path does not exist');
|
||||||
if (this.option_type === 'path')
|
if (this.option_type === 'path')
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@sapphirecode/console-app",
|
"name": "@sapphirecode/console-app",
|
||||||
"version": "2.1.3",
|
"version": "2.1.4",
|
||||||
"main": "dist/lib/index.js",
|
"main": "dist/lib/index.js",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Timo Hocker",
|
"name": "Timo Hocker",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user