Skip to content

'install.sh' fails in attempt to inflate '.zip' file using 'tar'. #497

Closed
@HansLindkvist

Description

@HansLindkvist

Bug Report

'install.sh' fails in attempt to inflate '.zip' file using 'tar'.

Current behavior

curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/bin sh

......
Downloading https://downloads.arduino.cc/arduino-cli/arduino-cli_0.6.0_Windows_64bit.zip
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
Failed to install arduino-cli

Expected behavior

......
Downloading https://downloads.arduino.cc/arduino-cli/arduino-cli_0.6.0_Windows_64bit.zip
Archive: /tmp/arduino-cli_0.6.0_Windows_64bit.zip
inflating: /tmp/arduino-cli/LICENSE.txt
inflating: /tmp/arduino-cli/README.md
inflating: /tmp/arduino-cli/arduino-cli.exe
arduino-cli.exe Version: 0.6.0 Commit: 3a08b07 installed successfully in /c/Users/Hans/bin

Environment

  • CLI version (output of arduino-cli version): arduino-cli.exe Version: 0.6.0 Commit: 3a08b07
  • OS and platform: MINGW64_NT-10.0-18363

Additional context

Patch:

156c156,160
< 	tar xf "$CLI_TMP_FILE" -C "$CLI_TMP"
---
> 	if [ "$OS" = "Windows" ]; then
> 		unzip -d "$CLI_TMP" "$CLI_TMP_FILE"
> 	else
> 		tar xf "$CLI_TMP_FILE" -C "$CLI_TMP"
> 	fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions