Skip to content

Commit 599df14

Browse files
Fix for Dev Proxy Installation Script on Linux: #558 (#608)
* When plugin defines an empty array of URLs to watch, use the global one #527 * Refactor plugin registration on line 55 to check for both null and non-empty 'pluginUrls'. This ensures proper handling of empty plugin URL arrays and aligns with the requirement outlined in the issue. Updated the 'Register' method call to conditionally use 'pluginUrls' or default to 'defaultUrlsToWatch' based on the not null and not empty check. #528 * Fix handling of empty 'urlsToWatch' in plugins This commit addresses the issue where plugins defining an empty array for 'urlsToWatch' would result in the plugin being disabled. The code has been modified to check for both null and empty arrays, and in both cases, it now defaults to using the global list of URLs. This ensures that plugins remain active even when no specific URLs are provided. * Update dev-proxy/PluginLoader.cs * GitHub actions * Update Dependencies * updated script.sh to working Linux and mac os checked it is working with both Linux and Mac * updated setup-beta.sh * Update setup-beta.sh * Update setup-beta.sh --------- Co-authored-by: Waldek Mastykarz <[email protected]>
1 parent 32772c8 commit 599df14

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

scripts/setup-beta.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,20 @@ fi
6969

7070
unzip -o ./devproxy.zip -d ./
7171
rm ./devproxy.zip
72-
echo "Configuring devproxy and its files as executable..."
73-
chmod +x ./devproxy ./libe_sqlite3.dylib
7472

75-
echo "Configuring new version notifications for the beta channel..."
76-
sed -i '' 's/"newVersionNotification": "stable"/"newVersionNotification": "beta"/g' ./devproxyrc.json
73+
# If it's macOS
74+
if [ "$(uname)" == "Darwin" ]; then
75+
echo "Configuring devproxy and its files as executable..."
76+
chmod +x ./devproxy ./libe_sqlite3.dylib
77+
echo "Configuring new version notifications for the beta channel..."
78+
sed -i '' 's/"newVersionNotification": "stable"/"newVersionNotification": "beta"/g' ./devproxyrc.json
79+
# If it's Linux
80+
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
81+
echo "Configuring devproxy and its files as executable..."
82+
chmod +x ./devproxy ./libe_sqlite3.so
83+
echo "Configuring new version notifications for the beta channel..."
84+
sed -i 's/"newVersionNotification": "stable"/"newVersionNotification": "beta"/g' ./devproxyrc.json
85+
fi
7786

7887
echo "Adding devproxy to the PATH environment variable in your shell profile..."
7988

scripts/setup.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,16 @@ fi
6969
unzip -o ./devproxy.zip -d ./
7070
rm ./devproxy.zip
7171
echo "Configuring devproxy and its files as executable..."
72-
chmod +x ./devproxy ./libe_sqlite3.dylib
72+
73+
# If it's macOS
74+
if [ "$(uname)" == "Darwin" ]; then
75+
# Set permissions for macOS
76+
chmod +x ./devproxy ./libe_sqlite3.dylib
77+
# If it's Linux
78+
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
79+
# Set permissions for Linux
80+
chmod +x ./devproxy ./libe_sqlite3.so
81+
fi
7382

7483
echo "Adding devproxy to the PATH environment variable in your shell profile..."
7584

0 commit comments

Comments
 (0)