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

85 read from stdin #86

Merged
merged 11 commits into from
Oct 19, 2021
Merged

85 read from stdin #86

merged 11 commits into from
Oct 19, 2021

Conversation

hesa
Copy link
Contributor

@hesa hesa commented Aug 25, 2021

Closes #85

Adding - to mean stdin we can use flict in pipes, like this

tool-that-gathers-info . | flict verify --project-file - 

@priv-kweihmann
Copy link
Collaborator

LGTM - now you just need to rebase and resolve the conflict and we can merge this fella 🥳

@priv-kweihmann
Copy link
Collaborator

Still not properly rebased - GH still showing conflicts :-(

with open(self.project_file) as fp:
return json.load(fp)
except json.JSONDecodeError:
raise FlictException(ReturnCodes.RET_INVALID_PROJECT, "File \"" + file_name + "\" does not contain valid JSON data")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f'File "{file_name}" does not contain valid JSON data'

except json.JSONDecodeError:
raise FlictException(ReturnCodes.RET_INVALID_PROJECT, "File \"" + file_name + "\" does not contain valid JSON data")
except (FileNotFoundError, IsADirectoryError):
raise FlictException(ReturnCodes.RET_FILE_NOT_FOUND, "File \"" + file_name + "\" could not be found or is a directory")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f'File "{file_name}" could not be found or is a directory'

@jens-erdmann
Copy link
Collaborator

jens-erdmann commented Sep 28, 2021

I took the liberty to fix this branch. See https://github.com/vinland-technology/flict/tree/85-read-from-stdin-fixed and feel free to take this as a replacement. We could also just create a new merge request instead.

EDIT: There still seems to be an issue:

ERROR
 + Message: Return values "10" and "12" differs

@hesa
Copy link
Contributor Author

hesa commented Oct 19, 2021

It seems to work :)

All tests pass. Have also tried some manual testing.

@hesa hesa merged commit 3418d10 into main Oct 19, 2021
@jens-erdmann jens-erdmann deleted the 85-read-from-stdin branch October 20, 2021 09:40
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.

read project from stdin
3 participants