You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example application or steps to reproduce the problem
Directory structure:
- R
-- plumber.R
- build
-- js
-- css
etc
Serve a build from a tag like
#' @assets ./build /list()
using
# working dir here is parent of `R` in next line where `build` above is.pr=plumber::plumb(file.path("R", "plumber.R"))
pr$run(port=8000)
Describe the problem in detail
This used to work fine in 0.4.* but now broken in 1.0.0. as I believe the relative path in here is no longer doing what it used to do in 0.4.
I have a working fix but not sure if this is meant to be expecting a relative path to the "plumber" file or just session working directory. If latter, which used to be the case, then I think my PR would take care of it.
Happy to listen before I send a PR.
The text was updated successfully, but these errors were encountered:
When plumb()ing a file (or Plumber$new(file)), the working directory is set to the file’s directory before parsing the file. When running the Plumber API, the working directory will be set to file’s directory before running.(#631)
System details
``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.0.2 (2020-06-22) #> os macOS Catalina 10.15.5 #> system x86_64, darwin17.0 #> ui X11 #> language (EN) #> collate en_GB.UTF-8 #> ctype en_GB.UTF-8 #> tz Europe/London #> date 2020-09-23 #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date lib source #> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.2) #> cli 2.0.2 2020-02-28 [1] CRAN (R 4.0.2) #> crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.2) #> digest 0.6.25 2020-02-23 [1] CRAN (R 4.0.2) #> evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.1) #> fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.2) #> glue 1.4.1 2020-05-13 [1] CRAN (R 4.0.2) #> highr 0.8 2019-03-20 [1] CRAN (R 4.0.2) #> htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.2) #> knitr 1.29 2020-06-23 [1] CRAN (R 4.0.2) #> magrittr 1.5 2014-11-22 [1] CRAN (R 4.0.2) #> rlang 0.4.7 2020-07-09 [1] CRAN (R 4.0.2) #> rmarkdown 2.3 2020-06-18 [1] CRAN (R 4.0.2) #> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.2) #> stringi 1.4.6 2020-02-17 [1] CRAN (R 4.0.2) #> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.0.2) #> withr 2.2.0 2020-04-20 [1] CRAN (R 4.0.2) #> xfun 0.16 2020-07-24 [1] CRAN (R 4.0.2) #> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.2) #> #> [1] /Library/Frameworks/R.framework/Versions/4.0/Resources/library ```
Created on 2020-09-23 by the reprex package (v0.3.0)
Example application or steps to reproduce the problem
Directory structure:
Serve a build from a tag like
using
Describe the problem in detail
This used to work fine in 0.4.* but now broken in 1.0.0. as I believe the relative path in here is no longer doing what it used to do in 0.4.
I have a working fix but not sure if this is meant to be expecting a relative path to the "plumber" file or just session working directory. If latter, which used to be the case, then I think my PR would take care of it.
Happy to listen before I send a PR.
The text was updated successfully, but these errors were encountered: