From 80e08ffc217535bc4e98a7bca61e61e0dc99f883 Mon Sep 17 00:00:00 2001 From: Adam Ward Date: Thu, 12 Dec 2024 14:40:03 -0500 Subject: [PATCH] Fix downloading vscode --- docker/sandbox.sb | 6 +++--- docker/test-macos.sh | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docker/sandbox.sb b/docker/sandbox.sb index 3373908d..91b37eb2 100644 --- a/docker/sandbox.sb +++ b/docker/sandbox.sb @@ -52,6 +52,8 @@ (allow mach-lookup) (allow mach-register) +(allow sysctl-read) +(allow ipc-posix-shm-read-data (literal "apple.shm.notification_center")) ; Write (allow file-write* @@ -76,6 +78,7 @@ (allow system-socket) (allow network-outbound (path "/private/var/run/mDNSResponder") + (remote tcp4 "*:80") (remote tcp4 "*:443") (remote tcp4 "*:3128") ) @@ -99,6 +102,3 @@ ; JSON language server (allow signal) - -; Uncomment when connected to Ottawa office network -(system-network) \ No newline at end of file diff --git a/docker/test-macos.sh b/docker/test-macos.sh index 4c23d4ea..9fc851f6 100755 --- a/docker/test-macos.sh +++ b/docker/test-macos.sh @@ -74,4 +74,13 @@ npm ci -ignore-script node-pty npm run lint npm run format npm run package -FAST_TEST_RUN=1 npm run coverage -- --coverage-output "$PWD/coverage" \ No newline at end of file + +# Download vscode +mkdir -p .vscode-test +curl -O -L "https://code.visualstudio.com/sha/download?build=stable&os=darwin-universal" +unzip download -d .vscode-test +rm download + +# export npm_config_proxy="$HTTPS_PROXY" +export npm_config_https_proxy="$HTTPS_PROXY" +VSCODE_INSTALL="$(pwd)/.vscode-test/Visual Studio Code.app" CI=1 FAST_TEST_RUN=1 npm run coverage -- --coverage-output "$PWD/coverage" \ No newline at end of file