-
Notifications
You must be signed in to change notification settings - Fork 4
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
From-template doesn't support directories with spaces in the path on Windows 10. #25
Comments
https://github.com/nixin72/from-template/blob/fb3c5520a491e55c763cfa883ad111df2677e7de/main.rkt#L60 |
Can also use build-path instead of |
Line 60 in 252111a
is this resolved?I don't have a windows machine to test on right now
if not resolvedIf or do we explicitly need to include quotation marks before and after the path? I've made a test file that could be used on windows:
system*Would this be resolved if we use
I've just jotted this down, I'll test on macOS this evening @nixin72 @priime0 appreciate your advice is anyone able to test on windows ? |
I'm currently refactoring a bunch of the code. I'm not sure what the reason was for having those system scripts in the first place, but I'm replacing them with just (system (format "git clone ..."))
Idk why I previously thought there was a need to go through bash or bat beforehand like that.
I can test on Window and MacOS these days.
…On Sunday, February 2nd, 2025 at 6:59 AM, Stephen De Gabrielle ***@***.***> wrote:
https://github.com/racket-templates/raco-new/blob/252111a9198048ff33299656547e0c5c63625df8/main.rkt#L60
is this resolved?
I don't have a windows machine to test on right now
(define [clone-repo repo-name dir-name]
(define protocol (if (ssh?) ***@***.***:" "https://github.com/"))
(case (system-type 'os)
[(unix)
(system (string-append "bash " (path->string linux-script) " " protocol " " repo-name " " dir-name))]
[(macosx)
(system (string-append "bash " (path->string macosx-script) " " protocol " " repo-name " " dir-name))]
[(windows)
(system (string-append "\"" (path->string windows-script)"\"" " " protocol " " repo-name " " dir-name))]))
if not resolved
If (define-runtime-path windows-script "raco-new.bat") is run under windows I believe it should create a string with windows path conventions like build-path
or do we explicitly need to include quotation marks before and after the path?
I've made a test file that could be used on windows:
#lang Racket
;; test to see if path->string adds quotation marks under windows
(require racket/runtime-path)
(define-runtime-path windows-script "raco-new.bat")
(define repo-name "blahrepo")
(define dir-name "dirblah")
(define protocol "https://github.com/")
;; if this displays ""raco-new.bat"" I'm assumign we don't need "\""
(displayln (string-append "\"" (path->string windows-script)"\"" " " protocol " " repo-name " " dir-name))
system*
Would this be resolved if we use (system* windows-script) protocol repo-name dir-name)
https://docs.racket-lang.org/reference/subprocess.html#%28def._%28%28lib._racket%2Fsystem..rkt%29._system%2A%29%29
e.g.
(define [clone-repo repo-name dir-name]
(define protocol (if (ssh?) ***@***.***:" "https://github.com/"))
(case (system-type 'os)
[(unix)
(system* linux-script protocol repo-name dir-name)]
[(macosx)
(system* macosx-script protocol repo-name dir-name)]
[(windows)
(system* windows-script protocol repo-name dir-name)]))
I've just jotted this down, I'll test on macOS this evening
***@***.***(https://github.com/nixin72) ***@***.***(https://github.com/priime0) appreciate your advice
is anyone able to test on windows ?
—
Reply to this email directly, [view it on GitHub](#25 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AFKAWB53CBYMNDHK6HO33ET2NYCCJAVCNFSM6AAAAABWKKLQT2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRZGM3DKNJQHA).
You are receiving this because you were assigned.Message ID: ***@***.***>
|
When attempting to use the Qi tutorial, I did
raco new qi-tutorial
in a subdirectory of my home folder. Unfortunately, my Windows username has a space in it. Accordingly, I get the message'C:\Users\Byron' is not recognized as an internal or external command, operable program or batch file.
, probably because the path isn't quoted in whatever script is being run.I also tried
raco new rosette
in a different subfolder to make sure it wasn't an issue with the qi tutorial specifically, which also failed in the same way.Specifying the path explicitly (whether as
.
or the quoted full absolute path) also encounters the same error.The text was updated successfully, but these errors were encountered: