You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the public install.sh, install.ps1 and upgrade.ps1 to the single-bundle
layout. They download the one `apify-cli` bundle and delegate wrapper-script
creation to `apify-cli install [--shims-only]` (the bundle is the single source
of truth for the apify/actor shims), instead of dropping three binaries or
hand-rolling the shim text.
- install.sh: detect Windows ARM64 (MINGW) target; download apify-cli; run
`apify-cli install` for shims + shell integration
- install.ps1: detect arch via PROCESSOR_ARCHITECTURE (no baseline for ARM64);
download apify-cli.exe; run `apify-cli install --shims-only`
- upgrade.ps1: download the single apify-cli bundle and run
`apify-cli install --shims-only`; clean up legacy .exe leftovers
Stacked on top of the single-apify-cli-bundle PR, which provides the bundle,
the `--shims-only` flag, and the upgrade URL contract these scripts rely on.
Write-Output"Install Failed - could not verify apify-cli.exe"
220
+
Write-Output"The command '${ApifyBin}\apify-cli.exe --version' exited with code ${LASTEXITCODE}`n"
221
+
return1
222
+
}
223
+
224
+
# Let the bundle create the `apify`/`actor` wrapper scripts (.cmd, .ps1 and a POSIX shim for Git Bash).
225
+
# Keeping the shim content in the bundle avoids duplicating it across the install/upgrade scripts.
226
+
# Skip the bundle's automatic version check here - we just downloaded the requested version.
227
+
$prevSkipCheck=$env:APIFY_CLI_SKIP_UPDATE_CHECK
228
+
$env:APIFY_CLI_SKIP_UPDATE_CHECK="1"
229
+
try {
230
+
&"${ApifyBin}\${FileName}" install --shims-only
231
+
}
232
+
finally {
233
+
$env:APIFY_CLI_SKIP_UPDATE_CHECK=$prevSkipCheck
234
+
}
235
+
if ($LASTEXITCODE-ne0) {
236
+
Write-Output"Install Failed - could not create the apify/actor wrapper scripts (exit code ${LASTEXITCODE})`n"
237
+
return1
219
238
}
220
239
221
240
$UpgradeScriptPath="${ApifyBin}\upgrade.ps1"
@@ -241,20 +260,20 @@ function Install-Apify {
241
260
$C_DIM= [char]27+"[0;2m"
242
261
243
262
Write-Output"${C_GREEN}Apify and Actor CLI ${ApifyVersion} were installed successfully!${C_RESET}"
244
-
Write-Output"${C_DIM}The binaries are located at ${ApifyBin}\apify.exe and ${ApifyBin}\actor.exe${C_RESET}`n"
263
+
Write-Output"${C_DIM}The bundle is located at ${ApifyBin}\apify-cli.exe (invoked via the apify.cmd and actor.cmd wrappers)${C_RESET}`n"
245
264
246
265
$hasExistingOther=$false;
247
266
try {
248
267
$existing=Get-Command apify -ErrorAction
249
-
if ($existing.Source-ne"${ApifyBin}\apify.exe") {
250
-
Write-Warning"Note: Another apify.exe is already in %PATH% at $($existing.Source)`nTyping 'apify' in your terminal will not use what was just installed.`n"
268
+
if ($existing.Source-ne"${ApifyBin}\apify.cmd") {
269
+
Write-Warning"Note: Another apify is already in %PATH% at $($existing.Source)`nTyping 'apify' in your terminal will not use what was just installed.`n"
251
270
$hasExistingOther=$true;
252
271
}
253
272
}
254
273
catch {}
255
274
256
275
if (!$hasExistingOther) {
257
-
# Only try adding to path if there isn't already a apify.exe in the path
276
+
# Only try adding to path if there isn't already an apify in the path
0 commit comments