Skip to content

Does not expand ~ #94

@yarikoptic

Description

@yarikoptic

(dev3) yoh@typhon:/mnt/DATA/data/yoh/BIDSonym$ gduct echo op
duct is executing echo op...
Log files will be written to ~/.cache/duct/reports/2024.06.10T21.44.08-3518040_
op

Exit Code: 0
Command: echo op
Log files location: ~/.cache/duct/reports/2024.06.10T21.44.08-3518040_
Wall Clock Time: 0.052 sec
Memory Peak Usage: unknown%
CPU Peak Usage: unknown%

(dev3) yoh@typhon:/mnt/DATA/data/yoh/BIDSonym$ ls -ld ~/.cache/duct/reports/2024.06.10T21.44.08-3518040_*
ls: cannot access '/home/yoh/.cache/duct/reports/2024.06.10T21.44.08-3518040_*': No such file or directory

(dev3) yoh@typhon:/mnt/DATA/data/yoh/BIDSonym$ ls -l
total 148
drwxr-xr-x 1 yoh yoh 12 Jun 10 21:44 '~'
-rw-r--r-- 1 yoh yoh 180 Jun 10 12:29 AUTHORS.rst
...

(dev3) yoh@typhon:/mnt/DATA/data/yoh/BIDSonym$ cat which gduct
#!/bin/bash

Helper to provide centralized collection of reports (when do not want per location)

set -eu

export DUCT_OUTPUT_PREFIX="~/.cache/duct/reports/{datetime_filesafe}-{pid}_"
mkdir -p "$(dirname "$DUCT_OUTPUT_PREFIX")"

duct "$@"

(dev3) yoh@typhon:/mnt/DATA/data/yoh/BIDSonym$ duct --version
duct 0.0.1


I think it is worth `os.path.expanduser` the prefix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions