Skip to content

Commit

Permalink
Resolve variables for after export command (#104)
Browse files Browse the repository at this point in the history
Replace the plugin-specific and environemnt variables in the export
command with their values to ensure consistency with the main command.
  • Loading branch information
Banus authored Jul 19, 2023
1 parent e64211c commit 172311c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/exporto0o.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ export async function exportToOo(
await ct.remote.shell.openPath(actualOutputPath);
}
if (setting.type === 'pandoc' && setting.runCommand === true && setting.command) {
await exec(setting.command);
const extCmd = renderTemplate(setting.command, variables);
await exec(extCmd, { cwd: variables.currentDir, env });
}
// success
onSuccess && onSuccess();
Expand Down

0 comments on commit 172311c

Please sign in to comment.