Skip to content

Packages installation not working starting golang 1.18Β #104

@visheyra

Description

@visheyra

πŸ—£οΈ Foreword

πŸ‘» Brief Description

When using the go 1.18 version, the package installation is no longer working because packages cannot be installed globally using go get leading to this error message:

         go: go.mod file not found in current directory or any parent directory.
    	'go get' is no longer supported outside a module.
    	To build and install a command, use 'go install' with a version,
    	like 'go install example.com/cmd@latest'
    	For more information, see https://golang.org/doc/go-get-install-deprecation
    	or run 'go help get' or 'go help install'.

πŸ₯ž Cookbook version

version is 5.3.2 but this will fail in any version

πŸ‘©β€πŸ³ Chef-Infra Version

chef version is 17.9.46 but this is not related.

🎩 Platform details

Operating system distribution and release version. Cloud provider if running in the cloud.

Steps To Reproduce

Steps to reproduce the behavior:

with a recipe using this cookbook:

  • specify go 1.18 or above (in my case 1.18.1)
  • specify a package to be installed using the node_attributes (in my case golangcilint)
  • run chef on the instance and see the error message

πŸš“ Expected behavior

I expect the package that I specified in node attributes being installed globally without failure

βž• Additional context

I'm trying to make a pr to fix this issue, however I'm kind of a noob in ruby/chef so I might have questions :)

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