Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling micro run for subfolders #1510

Merged
merged 9 commits into from
Apr 9, 2020
Merged

Enabling micro run for subfolders #1510

merged 9 commits into from
Apr 9, 2020

Conversation

crufter
Copy link
Contributor

@crufter crufter commented Apr 9, 2020

To reproduce the issue:

  • Step into micro/services repo locally.
  • Issue micro run account/api.

You will see:

$ micro run account/api
go: cannot find main module, but found .git/config in /home/crufter/code/src/github.com/micro/services
	to create a module there, run:
	go mod init

This is because micro run issues go run in the current folder (ie. micro/services) rather than in the subfolder. This PR fixes that by setting the Dir property for cmds executed.

Context: The reason I needed to do micro run [subfolder] is so micro run correctly sets the name of the service.

runtime/default.go Outdated Show resolved Hide resolved
runtime/options.go Outdated Show resolved Hide resolved
@asim asim merged commit 77f0abb into micro:master Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants