GoogleCloudPlatform / GoogleCloudPlatform/cloud-run-button

Repo Exists: cd & git pull crash out of script

Open
#113 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
553
Forks
98
PR merge metrics
No merged PRs in 30d

Description

## Problem

Looks like I had a locally created branch, but the pull expected to target this branch on an upstream. As a result, I got an error and got dropped from the run-button script.

```
cloudshell_open --repo_url "https://github.com/GoogleCloudPlatform/golang-samples" --dir "run/pubsub" --page "editor"
$ cloudshell_open --repo_url "https://github.com/GoogleCloudPlatform/golang-samples" --dir "run/pubsub" --page "editor"
You have already cloned this repo into directory golang-samples. Would you like to:
[1] cd into that directory
[2] cd into that directory and `git pull`
[3] git clone a new copy

Enter your choice [default 1]: 2

[...]

Your configuration specifies to merge with the ref 'refs/heads/go111-quickstart'
from the remote, but no such ref was fetched.
cd-ing into run/pubsub
-bash: cd: run/pubsub: No such file or directory
```

## Expected

Have a way to restart, such as the script offering to fall back to cloning a new repo.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.