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

web-server/insta sets wrong current-directory #99

Open
samth opened this issue Dec 22, 2020 · 4 comments
Open

web-server/insta sets wrong current-directory #99

samth opened this issue Dec 22, 2020 · 4 comments

Comments

@samth
Copy link
Sponsor Member

samth commented Dec 22, 2020

The value of (current-directory) upon entry to start is the htdocs directory inside the web-server collection, not the directory that Racket started in (as for other Racket programs) or the directory containing the program.

@jeapostrophe
Copy link
Contributor

jeapostrophe commented Dec 22, 2020 via email

@samth
Copy link
Sponsor Member Author

samth commented Dec 22, 2020

Unfortunately this works out poorly for the Continue tutorial, which uses (current-directory) and web-server/insta.

I see a few options:

  • Change the tutorial to use serve/servlet and #:servlet-current-directory
  • Change web-server/insta to set the current directory.
  • Change the tutorial to use define-runtime-path, as in my suggestion on the mailing list.

@jeapostrophe
Copy link
Contributor

I feel like it is plausible that web-server/insta could change... it feels like it is unlikely to be on the critical path of anyone's work to assume this about the cwd. I think it would be fine to change the tutorial to use d-r-p, although maybe too complicated. I don't think the tutorial should use serve/servlet, unless it is part of a bigger transition in the tutorial to that library.

@ChengxiX
Copy link

Change it to (current-directory-for-user), then the directory will be the current one

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

No branches or pull requests

3 participants