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

Show html path within wsl #276

Merged
merged 5 commits into from
Sep 21, 2022
Merged

Show html path within wsl #276

merged 5 commits into from
Sep 21, 2022

Conversation

TheRijn
Copy link
Contributor

@TheRijn TheRijn commented Feb 14, 2022

Closes #275
Checking if we're running wsl using https://www.scivision.dev/python-detect-wsl/
Then converting the path within Ubuntu to a windows path with wslpath -w.

Tested with check50 cs50/problems/2021/fall/hello --local on macOS 12.2.1 with python 3.9.10 and WSL Ubuntu 20.04 with python 3.8.10

WSL result:
To see the results in your browser go to file:///wsl.localhost/Ubuntu/tmp/tmpveuwk16x.html

macOS result:
To see the results in your browser go to file:///var/folders/j9/6b_9k8xs3pzcf8pxp6g08twh0000gn/T/tmp3iev6si6.html

@Jelleas
Copy link
Contributor

Jelleas commented Sep 20, 2022

Tested again under a fresh install. Works fine in both WSL's Ubuntu terminal and the newish Windows terminal. Links should soon be clickable in Windows Terminal: microsoft/terminal#7699

@rongxin-liu mind taking another look at this PR? We have a lot of WSL users and it'd be nice to have this merged 😀

@rongxin-liu rongxin-liu dismissed a stale review via 679598b September 21, 2022 03:07
@rongxin-liu
Copy link
Contributor

Looks good, merging! Thank you @TheRijn @Jelleas @AalOsman

@rongxin-liu rongxin-liu merged commit 73736ec into cs50:main Sep 21, 2022
@TheRijn TheRijn deleted the wsl-html-url branch September 24, 2022 19:08
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.

Can't open result html when working from WSL
3 participants