Fix npm task path now that there's no slash

This commit is contained in:
Alex Ross 2022-04-19 15:15:02 +02:00
parent 856e0ae9cb
commit a576b4c066
No known key found for this signature in database
GPG key ID: 89DDDBA66CBA7840

View file

@ -67,7 +67,7 @@ export class NpmTaskProvider implements TaskProvider {
return undefined;
}
if (kind.path) {
packageJsonUri = _task.scope.uri.with({ path: _task.scope.uri.path + '/' + kind.path + 'package.json' });
packageJsonUri = _task.scope.uri.with({ path: _task.scope.uri.path + '/' + kind.path + `${kind.path.endsWith('/') ? '' : '/'}` + 'package.json' });
} else {
packageJsonUri = _task.scope.uri.with({ path: _task.scope.uri.path + '/package.json' });
}