-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Describe the bug
I using script after install get error of pv expect integer argument
To Reproduce
$ tar-progress -cf /home/bkp/mozila_geral.tar .cache/mozilla .mozilla
pv: -s: integer argument expected
tar: -: Função write falhou: Pipe quebrado
tar: Error is not recoverable: exiting now
Expected behavior
Expect this work without problem, like this way
$ tar-progress -cf /home/bkp/mozila_geral.tar .cache/mozilla .mozilla
1,44GiB 0:00:06 [ 229MiB/s] [=================================================================================================================] 102%
System Information(please complete the following information):
- OS: Manjaro 20.0
- Version tar-progress 1.3.3
Additional context
To fix it i change file
/usr/lib/python3.8/site-packages/tar_progress/classes/linux.py
I change on lines 35, 37, 39, 41
Original lines
34 if compression == "gz":
35 command = "tar -cf - " + files + " | pv -s " + size + " | gzip > " + filename
36 elif compression == "bz2":
37 command = "tar -cf - " + files + " | pv -s " + size + " | bzip2 > " + filename
38 elif compression == "xz":
39 command = "tar -cf - " + files + " | pv -s " + size + " | xz > " + filename
40 else:
41 command = "tar -cf - " + files + " | pv -s " + size + " > " + filename
42 os.system(command)
Changed
34 if compression == "gz":
35 command = "tar -cf - " + files + " | pv -s " + size.decode() + " | gzip > " + filename
36 elif compression == "bz2":
37 command = "tar -cf - " + files + " | pv -s " + size.decode() + " | bzip2 > " + filename
38 elif compression == "xz":
39 command = "tar -cf - " + files + " | pv -s " + size.decode() + " | xz > " + filename
40 else:
41 command = "tar -cf - " + files + " | pv -s " + size.decode() + " > " + filename
42 os.system(command)
I just decode variable size
PS: First contribute sorry with I forgotten something
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels