Skip to content

Commit

Permalink
Regenerating recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
willvedd committed Dec 22, 2023
1 parent fe22c07 commit af44c4c
Show file tree
Hide file tree
Showing 5 changed files with 9,317 additions and 2,806 deletions.
9 changes: 5 additions & 4 deletions src/context/directory/handlers/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ function parse(context: DirectoryContext): ParsedActions {
const actionFolder = path.join(constants.ACTIONS_DIRECTORY, `${action.name}`);

if (action.code) {
const unixPath = action.code.replace(/[\\/]+/g, '/').replace(/^([a-zA-Z]+:|\.\/)/, '');
if (fs.existsSync(unixPath)) {
action.code = context.loadFile(unixPath, actionFolder);
const relativeToConfigPath = path.join(context.filePath, action.code);
if (fs.existsSync(relativeToConfigPath)) {
action.code = context.loadFile(relativeToConfigPath, actionFolder);
} else {
action.code = context.loadFile(path.join(context.filePath, action.code), actionFolder);
const unixPath = action.code.replace(/[\\/]+/g, '/').replace(/^([a-zA-Z]+:|\.\/)/, '');
action.code = context.loadFile(unixPath, actionFolder);
}
}

Expand Down
Loading

0 comments on commit af44c4c

Please sign in to comment.