We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0625be1 commit b96b750Copy full SHA for b96b750
src/index.ts
@@ -468,7 +468,11 @@ export class SocketSdk {
468
filepaths: string[],
469
pathsRelativeTo: string = '.'
470
): Promise<SocketSdkResultType<'CreateOrgFullScan'>> {
471
- const basePath = path.join(process.cwd(), pathsRelativeTo)
+ // Resolve will process path segments until it creates a valid absolute
472
+ // path. So if the given pathsRelativeTo is an absolute path, the cwd()
473
+ // is not used, which is the common expectation. If none of the paths
474
+ // resolve then it defaults to process.cwd()
475
+ const basePath = path.resolve(process.cwd(), pathsRelativeTo)
476
const absFilepaths = filepaths.map(p => path.join(basePath, p))
477
try {
478
const data = await getResponseJson(
0 commit comments