Giter VIP home page Giter VIP logo

Comments (9)

rosszurowski avatar rosszurowski commented on August 20, 2024

@dblohm7 I'd love advice on how to use the shell to query for it's location. I spent an hour and a bit last week trying to parse through online guides to Powershell but didn't find anything useful.

What commands would you use to query for the location of tailscale.exe?

from docker-extension.

dblohm7 avatar dblohm7 commented on August 20, 2024

@rosszurowski Using cmd I'd use where (it's basically identical to which).

I'm less familiar with PowerShell, but this looks like it's producing what we're looking for:

Get-Command tailscale | Format-Wide -Property Source

from docker-extension.

rosszurowski avatar rosszurowski commented on August 20, 2024

Perfect, thanks! I'll be running this from Docker's execHostCmd function, so I'll have to see whether that supports cmd or powershell. I'll give both of these a try.

from docker-extension.

rosszurowski avatar rosszurowski commented on August 20, 2024

Hmm… I can't get the PowerShell command to work in the terminal

image

Same with the cmd command

image

from docker-extension.

dblohm7 avatar dblohm7 commented on August 20, 2024

Can you check your PATH?
echo %PATH% in cmd, or $Env:PATH in PowerShell

from docker-extension.

rosszurowski avatar rosszurowski commented on August 20, 2024

Result of echo %PATH%:

C:\Program Files\Parallels\Parallels Tools\Applications;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Tailscale IPN;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\rosszurowski\AppData\Local\Microsoft\WindowsApps;

Result of $Env:PATH:

C:\Program Files\Parallels\Parallels Tools\Applications;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Tailscale IPN;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\rosszurowski\AppData\Local\Microsoft\WindowsApps

I may be running an odd environment since it's Windows 11 on ARM, emulated through Parallels (https://github.com/tailscale/corp/issues/3550). If you're confident one of those lines will work for most users, I'll just defer to that.

from docker-extension.

dblohm7 avatar dblohm7 commented on August 20, 2024

Oh, I know exactly what your problem is!

So Win11 on ARM our path should be in C:\Program Files (x86), but that is a known bug in our installation code when using NSIS. So we need to get that fixed in the client. But as far as the plugin is concerned, resolving it using the above technique should be okay.

from docker-extension.

rosszurowski avatar rosszurowski commented on August 20, 2024

Sounds good. I looked at the Node docs and it seems like the default shell is cmd.exe. So where tailscale.exe it is!

from docker-extension.

rosszurowski avatar rosszurowski commented on August 20, 2024

Example output to parse:

> child_process.exec("where cmd.exe", (err, stdout, stderr) => console.log(err, stdout, stderr))
null C:\Windows\System32\cmd.exe

> child_process.exec("where tailscale.exe", (err, stdout, stderr) => console.log(err, stdout, stderr))
Error: Command failed: where tailscale.exe
INFO: Could not find files for the given pattern(s).

    at ChildProcess.exithandler (node:child_process:399:12)
    at ChildProcess.emit (node:events:520:28)
    at ChildProcess.emit (node:domain:537:15)
    at maybeClose (node:internal/child_process:1090:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:520:28)
    at Socket.emit (node:domain:537:15)
    at Pipe.<anonymous> (node:net:687:12)
    at Pipe.callbackTrampoline (node:internal/async_hooks:130:17) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'where tailscale.exe'
}  INFO: Could not find files for the given pattern(s).

from docker-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.