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

throw error when in Debian #94

Closed
luvsunlight opened this issue Feb 10, 2023 · 3 comments
Closed

throw error when in Debian #94

luvsunlight opened this issue Feb 10, 2023 · 3 comments

Comments

@luvsunlight
Copy link

luvsunlight commented Feb 10, 2023

/bin/sh: 1: xdg-open: not found
child_process.js:866
    throw err;
    ^

Error: Command failed: xdg-open https://code.xxx.org/life_service/*********/merge_requests/new\?merge_request%5Bsource_branch%5D\=master
/bin/sh: 1: xdg-open: not found

    at checkExecSyncError (child_process.js:790:11)
    at Object.execSync (child_process.js:863:15)
    at open (/data00/home/lizhiyuan.prozac/.nvm/nvm-0.38.0/versions/node/v14.21.2/lib/node_modules/gitopen/lib/xopen.js:36:17)
    at /data00/home/lizhiyuan.prozac/.nvm/nvm-0.38.0/versions/node/v14.21.2/lib/node_modules/gitopen/bin/gitopen:75:5
    at module.exports (/data00/home/lizhiyuan.prozac/.nvm/nvm-0.38.0/versions/node/v14.21.2/lib/node_modules/gitopen/bin/open-commander.js:330:3)
    at Object.<anonymous> (/data00/home/lizhiyuan.prozac/.nvm/nvm-0.38.0/versions/node/v14.21.2/lib/node_modules/gitopen/bin/gitopen:16:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
  status: 127,
  signal: null,
  output: [
    null,
    Buffer(0) [Uint8Array] [],
    Buffer(32) [Uint8Array] [
       47,  98, 105, 110,  47, 115, 104,  58,
       32,  49,  58,  32, 120, 100, 103,  45,
      111, 112, 101, 110,  58,  32, 110, 111,
      116,  32, 102, 111, 117, 110, 100,  10
    ]
  ],
  pid: 80520,
  stdout: Buffer(0) [Uint8Array] [],
  stderr: Buffer(32) [Uint8Array] [
     47,  98, 105, 110,  47, 115, 104,  58,
     32,  49,  58,  32, 120, 100, 103,  45,
    111, 112, 101, 110,  58,  32, 110, 111,
    116,  32, 102, 111, 117, 110, 100,  10
  ]
}
@hotoo
Copy link
Owner

hotoo commented Feb 10, 2023

try to install:

sudo apt-get install xdg-utils --fix-missing

@hotoo hotoo closed this as completed Feb 10, 2023
@hotoo
Copy link
Owner

hotoo commented Mar 6, 2023

Cann't use xdg-open in ssh terminal.

see microsoft/terminal#14331

@hotoo
Copy link
Owner

hotoo commented Mar 8, 2023

https://unix.stackexchange.com/questions/450200/xdg-open-on-debian-9-fails-to-open-browser

have no effect below.

    --- /usr/bin/xdg-open   2018-05-20 00:18:48.000000000 +0200
+++ /home/klaumi/bin/xdg-open   2018-09-13 15:15:51.630704599 +0200
@@ -928,7 +928,7 @@
 {

     # pcmanfm only knows how to handle file:// urls and filepaths, it seems.
-    if pcmanfm --help >/dev/null 2>&1 -a is_file_url_or_path "$1"; then
+    if pcmanfm --help >/dev/null 2>$1 -a is_file_url_or_path "$1"; then
         local file="$(file_url_to_path "$1")"

         # handle relative paths

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

2 participants