Skip to content

Commit fe68108

Browse files
committed
fix: provide flag to avoid error when directory already exists
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: passed - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent f5fe4a6 commit fe68108

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/git/hooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ cleanup() {
105105

106106
# Creates a directory for caching hook results to allow accessing those results in subsequent hooks.
107107
create_cache_dir() {
108-
mkdir "${cache_dir}"
108+
mkdir -p "${cache_dir}"
109109
}
110110

111111
# Removes any previous hook results.

tools/git/hooks/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ cleanup() {
9595

9696
# Creates a directory for caching hook results to allow accessing those results in subsequent hooks.
9797
create_cache_dir() {
98-
mkdir "${cache_dir}"
98+
mkdir -p "${cache_dir}"
9999
}
100100

101101
# Removes any previous hook results.

0 commit comments

Comments
 (0)