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

Set WEBR and WEBR_VERSION environment variables #418

Merged
merged 2 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

* An `RObject.class()` method has been added, returning an `RCharacter` object with the names of the classes from which the given R object inherits. This has been implemented using R's `class()` function, and so the implicit class is similarly returned when the R object has no `class` attribute.

* WebR now sets the environment variable `WEBR` equal to `"1"` and `WEBR_VERSION` equal to the webR version string in the WebAssembly environment (#414).

## Bug Fixes

* Fix installing packages via shim with `character.only = TRUE` (#413).
Expand Down
2 changes: 2 additions & 0 deletions src/webR/webr-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ const defaultEnv = {
FONTCONFIG_PATH: '/etc/fonts',
R_HOME: '/usr/lib/R',
R_ENABLE_JIT: '0',
WEBR: '1',
WEBR_VERSION: WEBR_VERSION,
};

const defaultOptions = {
Expand Down