我尝试打开模拟器,但是VSCode告诉我:
open : The term 'open' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:1
+ open -a simulator
+ ~~~~
+ CategoryInfo : ObjectNotFound: (open:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
答案 0 :(得分:-1)
PowerShell的搜索路径与bash
和sh
不同。要在macOS上从PowerShell打开模拟器,您需要:
/usr/bin/open -a simulator