Closed imhosseinzadeh closed 9 months ago
This is a curious error that may be hard to reproduce. In general, it should make no difference whether you specify the file via the -f
parameter or via the environment parameter.
Could you share some more information on your system?
i faced problem on Fedora 39
, and now testing it again on Ubuntu 22.04.3 LTS
and it occurred again. I attach output.
In the screenshot, I do not see anything unexpected. What output does bartib start -f /home/iman/activities.bartib -d "test" -p "test"
yield? What are the file permissions of the activities.bartib
file?
stat activities.bartib
:
File: activities.bartib
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 815h/2069d Inode: 333577 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ iman) Gid: ( 1000/ iman)
Access: 2024-02-15 15:37:28.755726614 +0330
Modify: 2024-02-15 15:36:56.412074169 +0330
Change: 2024-02-15 15:36:56.412074169 +0330
Birth: 2024-02-15 15:36:56.412074169 +0330
bartib start -f /home/iman/activities.bartib -d "test" -p "test"
output:
error: Found argument '-f' which wasn't expected, or isn't valid in this context
USAGE:
bartib start [OPTIONS] --description <DESCRIPTION> --project <PROJECT>
For more information try --help
Sorry, my mistake. The command should have been: bartib -f /home/iman/activities.bartib start -d "test" -p "test"
with the -f
option before the subcommand. Could you try that again?
The permissions on the activities.bartib
file look good.
worked fine
iman@iman-H81M:~/bartib/target/release$ bartib -f /home/iman/activities.bartib start -d "test" -p "test"
Started activity: "test" (test) at 2024-02-15 19:03
So, are you still able to reproduce the initial error?
the Error: Please specify a file with your activity log either as -f option or as BARTIB_FILE environment variable
is produced again, if i execute bartib stop
I think it's useful if you can compile the last commit and test it on a virtual machine.
Ok, but that is to be expected when neither the -f
option or the environment variable is set. That's not a bug.
Have you been able to reproduce the error Error: Could not write to file: /home/iman/activities.bartib
. That is the one that I cannot explain.
I am sorry, but I am unable to reproduce the bug. I suspect the issue has something to do with your system setup, although I can not imagine which circumstances may lead to it.
I will close this issue. Feel free to open it again, if you can describe the steps to reproduce the initial bug. I would be happy to have a look at it.
I'm on Alpine linux and uxterm. I got the same result when I ran the command bartib start -f /home/nelson/.config/bartib/log -d "test" -p "test"
The error was:
error: Found argument '-f' which wasn't expected, or isn't valid in this context
USAGE:
bartib start [OPTIONS] --description <DESCRIPTION> --project <PROJECT>
For more information try --help
exporting the environment variable worked so that's what I'm using
The -f
option is different from all other options. Because it concerns all subcommands, it has to be placed immediately after bartib
and before the subcommand. Therefore, the correct command would be: bartib -f /home/nelson/.config/bartib/log start -d "test" -p "test"
.
Hi, thanks for development of this useful CLI tool. I had a problem using the Bartib in the early steps, so I decided to open this issue.
When i define the log file with
bartib -f /home/iman/activities.bartib report
after callingstart
i getError: Could not write to file: /home/iman/activities.bartib
but
export BARTIB_FILE="/home/iman/activities.bartib"
works fine.I installed Bartib by cloning the project and building with cargo, then moved binary output to
/usr/local/bin
.