Aws-sam-cli: sam init --runtime go is not working

Created on 13 Mar 2019  Â·  2Comments  Â·  Source: aws/aws-sam-cli

Description

Briefly describe the bug you are facing.

Steps to reproduce

➜  ~ sam --version
SAM CLI, version 0.13.0
➜  ~ sam init --runtime golang
Usage: sam init [OPTIONS]

Error: Invalid value for "-r" / "--runtime": invalid choice: golang. (choose from dotnetcore1.0, go1.x, dotnet, java, nodejs6.10, nodejs8.10, dotnetcore2.1, nodejs, ruby, python3.7, dotnetcore2.0, dotnetcore, go, python3.6, python2.7, java8, python, ruby2.5)

➜  ~ sam init --runtime go
[+] Initializing project structure...
Error: An error occurred while generating this sam-app: A valid repository for "/usr/local/Cellar/aws-sam-cli/0.13.0/libexec/lib/python3.7/site-packages/samcli/local/init/templates/cookiecutter-aws-sam-hello-go" could not be found in the following locations:
/usr/local/Cellar/aws-sam-cli/0.13.0/libexec/lib/python3.7/site-packages/samcli/local/init/templates/cookiecutter-aws-sam-hello-go
/usr/local/Cellar/aws-sam-cli/0.13.0/libexec/lib/python3.7/site-packages/samcli/local/init/templates/cookiecutter-aws-sam-hello-go

Expected result

A template is created

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: mac
  2. sam --version: 0.13.0

Add --debug flag to command you are running

areinit

Most helpful comment

Just ran across this issue.
They changed the name of the directory from

/usr/local/Cellar/aws-sam-cli/0.13.0/libexec/lib/python3.7/site-packages/samcli/local/init/templates/cookiecutter-aws-sam-hello-go
to
/usr/local/Cellar/aws-sam-cli/0.13.0/libexec/lib/python3.7/site-packages/samcli/local/init/templates/cookiecutter-aws-sam-hello-golang

In order to get this working just rename the directory back to
/usr/local/Cellar/aws-sam-cli/0.13.0/libexec/lib/python3.7/site-packages/samcli/local/init/templates/cookiecutter-aws-sam-hello-go

I would create a back of the original just in case. But this seems to be a simple fix.

All 2 comments

Just ran across this issue.
They changed the name of the directory from

/usr/local/Cellar/aws-sam-cli/0.13.0/libexec/lib/python3.7/site-packages/samcli/local/init/templates/cookiecutter-aws-sam-hello-go
to
/usr/local/Cellar/aws-sam-cli/0.13.0/libexec/lib/python3.7/site-packages/samcli/local/init/templates/cookiecutter-aws-sam-hello-golang

In order to get this working just rename the directory back to
/usr/local/Cellar/aws-sam-cli/0.13.0/libexec/lib/python3.7/site-packages/samcli/local/init/templates/cookiecutter-aws-sam-hello-go

I would create a back of the original just in case. But this seems to be a simple fix.

Was release in v0.14.1

Closing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Inkromind picture Inkromind  Â·  4Comments

debuggins picture debuggins  Â·  4Comments

Caian picture Caian  Â·  3Comments

joekiller picture joekiller  Â·  4Comments

asyba picture asyba  Â·  3Comments