Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

factotum dot : overwrite flag not consistent #97

Closed
nlehuby opened this issue Jan 16, 2017 · 1 comment
Closed

factotum dot : overwrite flag not consistent #97

nlehuby opened this issue Jan 16, 2017 · 1 comment
Assignees
Milestone

Comments

@nlehuby
Copy link

nlehuby commented Jan 16, 2017

When you use the --overwrite flag in a factotum dot command, you get a confusing error if the file does not exist yet.
It would be better if the flag overwrites the file if it already exists and creates it if not.

For now, this flag seems pretty useless as you have to check if the file already exist to know if you need to apply the flag.

@ninjabear
Copy link
Contributor

Hi @nlehuby,

You're quite right - it would be better to work in the way you suggest! I'll add this into the next release.

For now as a workaround - using factotum dot without the --output option prints the dotfile to stdout. This can be piped to a file for the same result, for example:

factotum dot samples/echo.factfile > myoutput.dot

@ninjabear ninjabear self-assigned this Jan 16, 2017
@ninjabear ninjabear added this to the Version 0.5.0 milestone Jan 16, 2017
ninjabear added a commit that referenced this issue Feb 13, 2017
When the --overwrite flag is used it should not fail if the file does not exist. It should instead
create the file as normal. This is similar to '>' when piping data to a file (in a shell).
@ninjabear ninjabear modified the milestones: 0.4.1, Version 0.5.0 Mar 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants