Skip to content

Commit

Permalink
adding sanitize path in callsite
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-raj committed May 21, 2024
1 parent 01b8ad1 commit 99c5d90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/contentstack-migration/src/utils/callsite.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

const getCallsites = require('callsites');
const { parse, resolve } = require('path');
const { pathValidator } = require('@contentstack/cli-utilities');
const { pathValidator, sanitizePath } = require('@contentstack/cli-utilities');

function getFileDirectory(path) {
const parentPath = pathValidator(resolve(path, '../')); // Assuming that will be 2 folders up
const parentPath = pathValidator(resolve(sanitizePath(path), '../')); // Assuming that will be 2 folders up
return parse(parentPath).dir;
}

Expand Down

0 comments on commit 99c5d90

Please sign in to comment.