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

easyrsa_mkdir(): Remove use of 'mkdir -p', use only 'mkdir' #1145

Merged
merged 3 commits into from
May 26, 2024

Conversation

TinCanTech
Copy link
Collaborator

Windows 11 fails to execute 'mkdir.exe -p $foo' and fails to return an error.

easyrsa_mkdir() is a simple wrapper function for 'mkdir', which specifically checks that the requested directory is created, without relying on the exit status of 'mkdir.exe'.

easyrsa_mkdir() does not support the '-p' (Parent) switch. Instead, easyrsa is tasked with creating the parent dirs as required.

The old easyrsa_mkdir_p() is removed and replaced.

This is not a fix for Windows 11, it is addressing a known issue by ensuring the failure is captured correctly.

@TinCanTech TinCanTech self-assigned this May 20, 2024
@TinCanTech TinCanTech added this to the v3.2.1 milestone May 20, 2024
@TinCanTech TinCanTech force-pushed the replace-easyrsa-mkdir-p branch 2 times, most recently from bbe8688 to 094cb08 Compare May 20, 2024 22:56
Windows 11 fails to execute 'mkdir.exe -p $foo' and fails
to return an error.

easyrsa_mkdir() is a simple wrapper function for 'mkdir',
which specifically checks that the requested directory is
created, without relying on the exit status of 'mkdir.exe'.

easyrsa_mkdir() does not support the '-p' (Parent) switch.
Instead, `easyrsa` is tasked with creating the parent dirs
as required.

The old easyrsa_mkdir_p() is removed and replaced.

This is not a fix for Windows 11, it is addressing a known
issue by ensuring the failure is captured correctly.

Signed-off-by: Richard T Bonhomme <[email protected]>
@TinCanTech TinCanTech linked an issue May 21, 2024 that may be closed by this pull request
Re. Windows 11; remove untested instructions related to non-admin mode.

Signed-off-by: Richard T Bonhomme <[email protected]>
Signed-off-by: Richard T Bonhomme <[email protected]>
@TinCanTech TinCanTech merged commit 61cecc3 into OpenVPN:master May 26, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revert changes made for Windows 10/11 mkdir -p failure
1 participant