Skip to content

Commit

Permalink
add config option to keep asciinema file
Browse files Browse the repository at this point in the history
  • Loading branch information
cioddi committed Jan 1, 2024
1 parent 29ca96d commit 3b5e87a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/executeCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface ConfigType {
typingPause: number;
promptPause: number;
timeout: number;
keepAsciinemaFile: boolean;
};
withDocker: boolean;
debug: boolean;
Expand All @@ -36,6 +37,7 @@ const defaultConfig: ConfigType = {
typingPause: 0.01,
promptPause: 1,
timeout: 30,
keepAsciinemaFile: true,
},
withDocker: false,
debug: false,
Expand Down Expand Up @@ -297,7 +299,7 @@ export async function executeCommands({
//await execProm("rm " + hostTmpPath + "/" + castTmpFilename + "*");

// remove the asciinema .cast file (maybe we should use it)
if (!config.debug) {
if (!config.asciinema.keepAsciinemaFile) {
log(
await execProm(
`docker exec --user runuser:${gid} ${containerId} bash -c 'rm ${recordingPath}/${castFilename}.cast && ls -al ${recordingPath}'`
Expand Down

0 comments on commit 3b5e87a

Please sign in to comment.