cloudsmith-io / cloudsmith-io/cloudsmith-examples
Example running scripts do not work on zsh or bash (M1 Macbook Pro)
- Dominant language
- Shell
- Stars
- 13
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
I can confirm that I have installed prerequisites:
- docker
- circleci-cli
When running the examples as per the README, I get the following error:
```
$ ./bin/run-examples
mktemp: illegal option -- p
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
mktemp [-d] [-q] [-u] -t prefix
```
When removing the `-p` parameter in the `run-example` file, I get the following:
```
$ ./bin/run-examples
mktemp: mkdtemp failed on /Users/aleghari/code/cloudsmith-examples: File exists
```
If I set a temporary random name for a directory, like `temp`, I get:
```
% ./bin/run-examples
==================================================
Running example: alpine-cli
==================================================
./bin/run-example: line 21: CLOUDSMITH_REPOSITORY: unbound variable
==================================================
Running example: cargo-cli
==================================================
./bin/run-example: line 21: CLOUDSMITH_REPOSITORY: unbound variable
==================================================
Running example: composer-cli
==================================================
./bin/run-example: line 21: CLOUDSMITH_REPOSITORY: unbound variable
...
```
I figured out that you need `docker-desktop` to be running, not just docker cli. Once I did that, I got the following warning:
```
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
```
I've played with changing the image paths to `arm64`, but no joy there. As far as I can tell, these examples don't support M1 Macs? I really hope I'm wrong. 🙏🏼
I have attempted this on my Macbook Pro (M1) using `zsh` and `bash`.
Contributor guide
Assessment
This issue has not been assessed yet.