-
Notifications
You must be signed in to change notification settings - Fork 293
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
.bashrc PATH variable not being honored on Gnome + Wayland #1028
Comments
hmmm... can you examine the process env in the spawned jest shell by following the instruction here: How to see more debug info (self-diagnosis)?, as well as the logs about spawned command and if it is using login shell etc. |
node:electron/js2c/renderer_init:89 Electron Security Warning (enableBlinkFeatures) This renderer process has additional "enableBlinkFeatures"
enabled. This exposes users of this app to some security risk. If you do not
need this feature, you should disable it.
For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.
(anonymous) @ node:electron/js2c/renderer_init:89
log.ts:441 ERR Extension 'ms-vscode.js-debug CANNOT USE these API proposals 'portsAttributes, findTextInFiles, workspaceTrust, tunnels'. You MUST start in extension development mode or use the --enable-proposed-api command line flag
log.ts:441 ERR [eamodio.gitlens]: editor/lineNumber/context is a proposed menu identifier. It requires 'package.json#enabledApiProposals: ["contribEditorLineNumberMenu"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api eamodio.gitlens
console.ts:137 [Extension Host] [mikro-orm/ProcessSessionManager] scheduling jest process: list-test-files
console.ts:137 [Extension Host] spawning process with command=yarn test --listTests --json --watchAll=false options: Objectcwd: "/home/niko/devel/mikro-orm"detached: trueenv: ANT_HOME: "/usr/share/ant"CASROOT: "/usr"CHROME_DESKTOP: "Electron.desktop"CONFIG_PROTECT: "/usr/share/gnupg/qualified.txt /usr/share/config /usr/lib64/libreoffice/program/sofficerc"CONFIG_PROTECT_MASK: "/etc/sandbox.d /etc/php/cli-php8.1/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/fonts/fonts.conf /etc/gentoo-release /etc/dconf /etc/ca-certificates.conf /etc/revdep-rebuild"CSF_GraphicShr: "/usr/lib64/opencascade/libTKOpenGl.so"CSF_IGESDefaults: "/usr/share/opencascade/resources/XSTEPResource"CSF_MDTVTexturesDirectory: "/usr/share/opencascade/resources/Textures"CSF_MIGRATION_TYPES: "/usr/share/opencascade/resources/StdResource/MigrationSheet.txt"CSF_PluginDefaults: "/usr/share/opencascade/resources/StdResource"CSF_SHMessage: "/usr/share/opencascade/resources/SHMessage"CSF_STEPDefaults: "/usr/share/opencascade/resources/XSTEPResource"CSF_ShadersDirectory: "/usr/share/opencascade/resources/Shaders"CSF_StandardDefaults: "/usr/share/opencascade/resources/StdResource"CSF_StandardLiteDefaults: "/usr/share/opencascade/resources/StdResource"CSF_UnitsDefinition: "/usr/share/opencascade/resources/UnitsAPI/Units.dat"CSF_XCAFDefaults: "/usr/share/opencascade/resources/StdResource"CSF_XSMessage: "/usr/share/opencascade/resources/XSMessage"CSF_XmlOcafResource: "/usr/share/opencascade/resources/XmlOcafResource"DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/1000/bus"DESKTOP_SESSION: "gnome"DISPLAY: ":1"EDITOR: "/bin/nano"ELECTRON_NO_ATTACH_CONSOLE: "1"ELECTRON_RUN_AS_NODE: "1"GCC_SPECS: ""GDK_BACKEND: "x11"GDMSESSION: "gnome"GDM_LANG: "en_US.UTF-8"GIO_LAUNCHED_DESKTOP_FILE: "/usr/share/applications/code-oss.desktop"GIO_LAUNCHED_DESKTOP_FILE_PID: "3579387"GJS_DEBUG_OUTPUT: "stderr"GJS_DEBUG_TOPICS: "JS ERROR;JS LOG"GSETTINGS_BACKEND: "dconf"GTK_MODULES: "canberra-gtk-module"HOME: "/home/niko"INFOPATH: "/usr/share/gcc-data/powerpc64le-unknown-linux-gnu/12/info:/usr/share/binutils-data/powerpc64le-unknown-linux-gnu/2.39/info:/usr/share/info"INVOCATION_ID: "ba7692fb2fa54f2db5fa6909550befb4"JAVAC: "/etc/java-config-2/current-system-vm/bin/javac"JAVA_HOME: "/etc/java-config-2/current-system-vm"JDK_HOME: "/etc/java-config-2/current-system-vm"JOURNAL_STREAM: "8:29268"LADSPA_PATH: "/usr/lib64/ladspa"LANG: "en_US.UTF-8"LESS: "-R -M --shift 5"LESSOPEN: "|lesspipe %s"LEX: "flex"LOGNAME: "niko"LV2_PATH: "/usr/lib64/lv2"MAIL: "/var/mail/niko"MANAGERPID: "2026"MANPAGER: "manpager"MANPATH: "/etc/java-config-2/current-system-vm/man:/usr/share/gcc-data/powerpc64le-unknown-linux-gnu/12/man:/usr/share/binutils-data/powerpc64le-unknown-linux-gnu/2.39/man:/etc/java-config-2/current-system-vm/man/:/usr/lib64/php8.1/man/:/usr/local/share/man:/usr/share/man:/usr/lib/rust/man:/usr/lib/llvm/16/share/man:/usr/lib/llvm/15/share/man"MOTD_SHOWN: "pam"MOZ_GMP_PATH: "/usr/lib64/nsbrowser/plugins/gmp-gmpopenh264/system-installed"NO_AT_BRIDGE: "1"NPM_CONFIG_GLOBALCONFIG: "/etc/npm/npmrc"NPM_CONFIG_NODEDIR: "/usr/lib64/electron-19/node/"ORIGINAL_XDG_CURRENT_DESKTOP: "GNOME"PAGER: "/usr/bin/less"PATH: "/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/16/bin:/usr/lib/llvm/15/bin:/usr/lib64/opencascade/bin"PWD: "/home/niko"QEMU_LD_PREFIX: "/home/niko/chroots/arch-x86_64"QT_IM_MODULE: "ibus"RADV_PERFTEST: "gpl"ROOTPATH: "/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/16/bin:/usr/lib/llvm/15/bin"RUSTICL_ENABLE: "radeonsi"SESSION_MANAGER: "local/talos2:@/tmp/.ICE-unix/2134,unix/talos2:/tmp/.ICE-unix/2134"SHELL: "/bin/bash"SHLVL: "0"SSH_AGENT_PID: "2096"SSH_AUTH_SOCK: "/run/user/1000/keyring/ssh"SYSTEMD_EXEC_PID: "2152"USER: "niko"USERNAME: "niko"VSCODE_AMD_ENTRYPOINT: "vs/workbench/api/node/extensionHostProcess"VSCODE_CLI: "1"VSCODE_CODE_CACHE_PATH: "/home/niko/.config/Code - OSS/CachedData/fdb61c765fe88271c90a0d9fec1c0eb276bb00c5"VSCODE_CWD: "/home/niko"VSCODE_HANDLES_UNCAUGHT_ERRORS: "true"VSCODE_IPC_HOOK: "/run/user/1000/vscode-dab5a489-1.78-main.sock"VSCODE_NLS_CONFIG: "{\"locale\":\"en-us\",\"osLocale\":\"en\",\"availableLanguages\":{},\"_languagePackSupport\":true}"VSCODE_PID: "3579405"WINDOWPATH: "2"XAUTHORITY: "/run/user/1000/gdm/Xauthority"XCURSOR_THEME: "Adwaita"XDG_CONFIG_DIRS: "/etc/xdg"XDG_CURRENT_DESKTOP: "GNOME"XDG_DATA_DIRS: "/usr/share/gnome:/usr/local/share:/usr/share:/usr/share/gdm"XDG_MENU_PREFIX: "gnome-"XDG_RUNTIME_DIR: "/run/user/1000"XDG_SESSION_CLASS: "user"XDG_SESSION_DESKTOP: "gnome"XDG_SESSION_TYPE: "x11"XMODIFIERS: "@im=ibus"XZ_DEFAULTS: "-T0"[[Prototype]]: Objectshell: true[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()__proto__: (...)get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()
console.ts:137 [Extension Host] [mikro-orm/JestExt] found undefined testFiles
log.ts:441 ERR [Extension Host] [mikro-orm/JestExt] failed to retrieve test file list. TestExplorer might show incomplete test items error @mikro-orm/[email protected]: The engine "yarn" is incompatible with this module. Expected version ">=3.2.0". Got "1.22.19"
error Commands cannot run with an incompatible environment.
console.ts:137 [Extension Host] [mikro-orm/JestExt] failed to retrieve test file list. TestExplorer might show incomplete test items error @mikro-orm/[email protected]: The engine "yarn" is incompatible with this module. Expected version ">=3.2.0". Got "1.22.19"
error Commands cannot run with an incompatible environment.
I @ console.ts:137
log.ts:421 INFO [perf] Render performance baseline is 191ms Object
cwd: "/home/niko/devel/mikro-orm"
detached: true
env:
ANT_HOME: "/usr/share/ant"
CASROOT: "/usr"
CHROME_DESKTOP: "Electron.desktop"
CONFIG_PROTECT: "/usr/share/gnupg/qualified.txt /usr/share/config /usr/lib64/libreoffice/program/sofficerc"
CONFIG_PROTECT_MASK: "/etc/sandbox.d /etc/php/cli-php8.1/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/fonts/fonts.conf /etc/gentoo-release /etc/dconf /etc/ca-certificates.conf /etc/revdep-rebuild"
CSF_GraphicShr: "/usr/lib64/opencascade/libTKOpenGl.so"
CSF_IGESDefaults: "/usr/share/opencascade/resources/XSTEPResource"
CSF_MDTVTexturesDirectory: "/usr/share/opencascade/resources/Textures"
CSF_MIGRATION_TYPES: "/usr/share/opencascade/resources/StdResource/MigrationSheet.txt"
CSF_PluginDefaults: "/usr/share/opencascade/resources/StdResource"
CSF_SHMessage: "/usr/share/opencascade/resources/SHMessage"
CSF_STEPDefaults: "/usr/share/opencascade/resources/XSTEPResource"
CSF_ShadersDirectory: "/usr/share/opencascade/resources/Shaders"
CSF_StandardDefaults: "/usr/share/opencascade/resources/StdResource"
CSF_StandardLiteDefaults: "/usr/share/opencascade/resources/StdResource"
CSF_UnitsDefinition: "/usr/share/opencascade/resources/UnitsAPI/Units.dat"
CSF_XCAFDefaults: "/usr/share/opencascade/resources/StdResource"
CSF_XSMessage: "/usr/share/opencascade/resources/XSMessage"
CSF_XmlOcafResource: "/usr/share/opencascade/resources/XmlOcafResource"
DBUS_SESSION_BUS_ADDRESS: "unix:path=/run/user/1000/bus"
DESKTOP_SESSION: "gnome"
DISPLAY: ":1"
EDITOR: "/bin/nano"
ELECTRON_NO_ATTACH_CONSOLE: "1"
ELECTRON_RUN_AS_NODE: "1"
GCC_SPECS: ""
GDK_BACKEND: "x11"
GDMSESSION: "gnome"
GDM_LANG: "en_US.UTF-8"
GIO_LAUNCHED_DESKTOP_FILE: "/usr/share/applications/code-oss.desktop"
GIO_LAUNCHED_DESKTOP_FILE_PID: "3579387"
GJS_DEBUG_OUTPUT: "stderr"
GJS_DEBUG_TOPICS: "JS ERROR;JS LOG"
GSETTINGS_BACKEND: "dconf"
GTK_MODULES: "canberra-gtk-module"
HOME: "/home/niko"
INFOPATH: "/usr/share/gcc-data/powerpc64le-unknown-linux-gnu/12/info:/usr/share/binutils-data/powerpc64le-unknown-linux-gnu/2.39/info:/usr/share/info"
INVOCATION_ID: "ba7692fb2fa54f2db5fa6909550befb4"
JAVAC: "/etc/java-config-2/current-system-vm/bin/javac"
JAVA_HOME: "/etc/java-config-2/current-system-vm"
JDK_HOME: "/etc/java-config-2/current-system-vm"
JOURNAL_STREAM: "8:29268"
LADSPA_PATH: "/usr/lib64/ladspa"
LANG: "en_US.UTF-8"
LESS: "-R -M --shift 5"
LESSOPEN: "|lesspipe %s"
LEX: "flex"
LOGNAME: "niko"
LV2_PATH: "/usr/lib64/lv2"
MAIL: "/var/mail/niko"
MANAGERPID: "2026"
MANPAGER: "manpager"
MANPATH: "/etc/java-config-2/current-system-vm/man:/usr/share/gcc-data/powerpc64le-unknown-linux-gnu/12/man:/usr/share/binutils-data/powerpc64le-unknown-linux-gnu/2.39/man:/etc/java-config-2/current-system-vm/man/:/usr/lib64/php8.1/man/:/usr/local/share/man:/usr/share/man:/usr/lib/rust/man:/usr/lib/llvm/16/share/man:/usr/lib/llvm/15/share/man"
MOTD_SHOWN: "pam"
MOZ_GMP_PATH: "/usr/lib64/nsbrowser/plugins/gmp-gmpopenh264/system-installed"
NO_AT_BRIDGE: "1"
NPM_CONFIG_GLOBALCONFIG: "/etc/npm/npmrc"
NPM_CONFIG_NODEDIR: "/usr/lib64/electron-19/node/"
ORIGINAL_XDG_CURRENT_DESKTOP: "GNOME"
PAGER: "/usr/bin/less"
PATH: "/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/16/bin:/usr/lib/llvm/15/bin:/usr/lib64/opencascade/bin"
PWD: "/home/niko"
QEMU_LD_PREFIX: "/home/niko/chroots/arch-x86_64"
QT_IM_MODULE: "ibus"
RADV_PERFTEST: "gpl"
ROOTPATH: "/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/16/bin:/usr/lib/llvm/15/bin"
RUSTICL_ENABLE: "radeonsi"
SESSION_MANAGER: "local/talos2:@/tmp/.ICE-unix/2134,unix/talos2:/tmp/.ICE-unix/2134"
SHELL: "/bin/bash"
SHLVL: "0"
SSH_AGENT_PID: "2096"
SSH_AUTH_SOCK: "/run/user/1000/keyring/ssh"
SYSTEMD_EXEC_PID: "2152"
USER: "niko"
USERNAME: "niko"
VSCODE_AMD_ENTRYPOINT: "vs/workbench/api/node/extensionHostProcess"
VSCODE_CLI: "1"
VSCODE_CODE_CACHE_PATH: "/home/niko/.config/Code - OSS/CachedData/fdb61c765fe88271c90a0d9fec1c0eb276bb00c5"
VSCODE_CWD: "/home/niko"
VSCODE_HANDLES_UNCAUGHT_ERRORS: "true"
VSCODE_IPC_HOOK: "/run/user/1000/vscode-dab5a489-1.78-main.sock"
VSCODE_NLS_CONFIG: "{\"locale\":\"en-us\",\"osLocale\":\"en\",\"availableLanguages\":{},\"_languagePackSupport\":true}"
VSCODE_PID: "3579405"
WINDOWPATH: "2"
XAUTHORITY: "/run/user/1000/gdm/Xauthority"
XCURSOR_THEME: "Adwaita"
XDG_CONFIG_DIRS: "/etc/xdg"
XDG_CURRENT_DESKTOP: "GNOME"
XDG_DATA_DIRS: "/usr/share/gnome:/usr/local/share:/usr/share:/usr/share/gdm"
XDG_MENU_PREFIX: "gnome-"
XDG_RUNTIME_DIR: "/run/user/1000"
XDG_SESSION_CLASS: "user"
XDG_SESSION_DESKTOP: "gnome"
XDG_SESSION_TYPE: "x11"
XMODIFIERS: "@im=ibus"
XZ_DEFAULTS: "-T0"
[[Prototype]]: Object
shell: true
[[Prototype]]: Object |
In the console log, did you see anything regarding running a login shell? Also, did you by any chance customize vscode's terminal/shell settings? |
The setting that could change the terminal shell profiles, such as If you just run the default bash shell in the terminal, all your setting is in Let me know what happens after you set the shell setting accordingly. |
Ok, thanks for the detailed info. This leads me to think maybe none of your login profiles ( If it is indeed the case, and you can't add the .bashrc to your login profiles, then you need to find a way to source "scripts": {
"test": "bash -c 'source ~/.bashrc && yarn actual-test'",
"actual-test": "<the_original_test_command>"
}, But make sure it can find "yarn" to kick off the rest. Anyway, let's verify the root cause first. Once we know what it is, I am sure there will be a lot more solutions you can devise. |
I think that
That does indeed work, but I cannot do so in a project where I'm just an external contributor. |
maybe... the other alternative is to directly modify |
Weirdly
Also I cannot set so globally because not every project uses yarn. |
you need to put them into the same bash session, try
You don't need to use yarn, copy the actual test script from project.json and use it directly in jestCommandLine. Not sure what you mean by globally? |
Nope, it's the same unfortunately.
You can configure it either per-workspace or per-user and I'm doing the latter ( |
Environment
vscode-jest version
: v5.2.3node -v
: v18.16.0npm -v
oryarn --version
: 4.0.0-rc.44 (corepack)npm ls jest
ornpm ls react-scripts
(if you haven’t ejected):Prerequisite
npm run test
ornode_modules/.bin/jest
) yarn testSteps to Reproduce
Clone this repo: https://github.com/mikro-orm/mikro-orm/tree/v6
Checkout to the
v6
branch.yarn install
Open vscode (Ozone Wayland) via the Gnome applications launcher under Wayland.
Wait for the error in the jest terminal:
Relevant Debug Info
Symlinking
/home/niko/.local/share/fnm/node-versions/v18.16.0/installation/bin/yarn
to/usr/bin/yarn
fixes the issue so it's definitely a PATH problem, which is weird because the bash terminal in vscode works:Also starting vscode from the console instead of the Gnome application launcher works as well.
Vscode has been compiled from source, it's not a flatpak.
There are other applications which don't get access to environment variables when launched via the Gnome application launcher, like darktable. For them I ended up setting
~/.config/environment.d
:which works for darktable.
Since I'm using
fnm
I use the following command to set the PATH and the other env variables in.bashrc
:which returns the following:
Not sure if
~/.config/environment.d
is able to evaluate shell commands likeeval "$(fnm env --arch ppc64le --use-on-cd)"
, but it doesn't work. I also cannot copy-paste the resulting variables because the number afterfnm_multishells
changes every time you run it.Expected Behavior
It should makes use of the PATH from
.bashrc
.Actual Behavior
The text was updated successfully, but these errors were encountered: