From 1dfd5b03351c7fcbd031272be2d700b965e881e3 Mon Sep 17 00:00:00 2001 From: Alessandro Santamaria Date: Mon, 2 Mar 2020 15:03:05 +0100 Subject: [PATCH] update chocolatey windows install command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit new chocolatey windows install command pasted from chocolatey.org, old command throws errors: In Zeile:1 Zeichen:13 + @powershell -ExecutionPolicy unrestricted -Command "iex ((new-object ... + ~~~~~~~~~~~~~~~~ Unerwartetes Token "-ExecutionPolicy" in Ausdruck oder Anweisung. In Zeile:1 Zeichen:30 + @powershell -ExecutionPolicy unrestricted -Command "iex ((new-object ... + ~~~~~~~~~~~~ Unerwartetes Token "unrestricted" in Ausdruck oder Anweisung. In Zeile:1 Zeichen:140 + ... nt).DownloadString('https://chocolatey.org/install.ps1'))" && SET PAT ... + ~~ Das Token "&&" ist in dieser Version kein gültiges Anweisungstrennzeichen. In Zeile:1 Zeichen:1 + @powershell -ExecutionPolicy unrestricted -Command "iex ((new-object ... + ~~~~~~~~~~~ Der Splat-Operator "@" kann nicht dazu verwendet werden, auf Variablen in einem Ausdruck zu verweisen. "@powershell" kann nur als Argument für einen Befehl verwendet werden. Wenn Sie auf Variablen in einem Ausdruck verweisen möchten, verwenden Sie "$powershell". + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : UnexpectedToken --- docs/start/ns-setup-win.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/start/ns-setup-win.md b/docs/start/ns-setup-win.md index ae2daa271..358e76d78 100644 --- a/docs/start/ns-setup-win.md +++ b/docs/start/ns-setup-win.md @@ -25,7 +25,7 @@ Complete the following steps to set up NativeScript on your Windows development - Run the command prompt as an Administrator. - Copy and paste the following script in the command prompt. -
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
+        
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
         
- Restart the command prompt.