Skip to content

Conversation

Bubballoo3
Copy link
Contributor

Removes the need for WSL to build docs, simplifying the process as described in OSC/ood-documentation-build#24. Tested on Ubuntu and Powershell, should retain old functionality across other UNIX systems and macs (but not tested)

Rakefile Outdated
Comment on lines 57 to 58
user_section = ''
current_dir = '.'
if !windows?
user_section = "-u '#{user_group}'"
end
"docker run --rm -it -v \"#{__dir__}:/doc\" #{user_section} #{image}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

current_dir doesn't appear to be used.

Can you turn user_selection into a ternary like

user_selection = windows? : nil ? "-u '#{user_group}'"

Also does single quote `'` not work here? `\"` always looks funny to me.

Copy link
Contributor Author

@Bubballoo3 Bubballoo3 Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that, I removed the current_dir variable and included the ternary in place of the if statement. The double quotes are necessary as the single quotes (when passed through by exec()) are interpreted as a volume name by docker (on windows). We could use no quotes instead, but double quotes will keep the same protection against spaces in the path.

@johrstrom johrstrom merged commit 03df912 into latest Sep 5, 2025
1 check passed
@johrstrom johrstrom deleted the cross-platform branch September 5, 2025 16:55
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.

2 participants