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

Include instructions after src action exec #202

Closed
ryanslade opened this issue May 15, 2020 · 5 comments · Fixed by #214
Closed

Include instructions after src action exec #202

ryanslade opened this issue May 15, 2020 · 5 comments · Fixed by #214
Assignees
Labels
enhancement New feature or request

Comments

@ryanslade
Copy link
Contributor

Add some instructions to src action exec when everything went well and we print a patch to stdout.

Print instructions to STDERR after the json has been dumped.

@mrnugget
Copy link
Contributor

A thought I had: maybe we should rethink dumping the patch to stdout and instead use a default location, like ./patches.json, that can be overwritten with -o. The message is then something like "Patches saved to patches.json. Use 'src action patchset create-from-patches -f patches.json` ..."

@ryanslade
Copy link
Contributor Author

If we make creating a file the default do we still want to handle the case where they pipe the output to create patches? eg:

src actions exec -f ~/run-gofmt.json | src campaign patchset create-from-patches

We could check if stdout is pointing at a pipe 'tee' output there too in that case?

@mrnugget
Copy link
Contributor

mrnugget commented Jun 2, 2020

We could check if stdout is pointing at a pipe 'tee' output there too in that case?

I think that's a good default, yes.

  • If -o filename is given, write to filename.
  • If no -o filename is given and stdout is not a pipe, write to patches.json.
  • If no -o filename is given and stdout is a pipe, write to pipe.

@mrnugget
Copy link
Contributor

mrnugget commented Jun 3, 2020

@ryanslade if I understand it correctly, #214 did only include the "print to default" file part of this ticket, but not "print instructions", right?

@ryanslade
Copy link
Contributor Author

Yep, working on the instructions now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants