Skip to content

Instantly share code, notes, and snippets.

@deevus
Last active December 17, 2017 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deevus/3fbc29bddca4d39ad9c7 to your computer and use it in GitHub Desktop.
Save deevus/3fbc29bddca4d39ad9c7 to your computer and use it in GitHub Desktop.
$path = split-path $(resolve-path $(scoop which telegram))
push-location $path
./Telegram.exe
pop-location
@rasa
Copy link

rasa commented Dec 17, 2017

As scoop which telegram finds the telegram.cmd in the shims folder, I get the following error with the above script:

./Telegram.exe : The term './Telegram.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a pat
included, verify that the path is correct and try again.
At C:\Users\ross\scoop\apps\telegram\current\telegram.ps1:3 char:1
+ ./Telegram.exe
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (./Telegram.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

This script worked:

push-location $PSScriptRoot
./Telegram.exe
pop-location

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment