Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix output directory deletion #470

Merged
merged 2 commits into from Feb 13, 2022
Merged

fix output directory deletion #470

merged 2 commits into from Feb 13, 2022

Conversation

nicoandmee
Copy link
Contributor

Describe the bug

In reconftw.cfg, if dir_output is set to the same directory as where the script is running, the output directory will be deleted as a consequence of https://github.com/six2dez/reconftw/blob/main/reconftw.sh#L1741.

Expected behavior
Since output directory and working directory are the same, do nothing.

Additional context
I opened a previous issue regarding this and suggested this patch:

[[ "$dir" != "$dir_output" ]] && rm -rf "$dir"

However I forgot that $dir and $output_dir are slightly different. This should resolve that comparison.

@six2dez six2dez changed the base branch from main to dev February 13, 2022 21:23
@six2dez six2dez merged commit 6d3d53c into six2dez:dev Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants