__file type should accept paths like ~username/path/to/file #248

Closed
opened 2021-11-20 15:22:27 +00:00 by ungleich-gitea · 1 comment

Created by: asteven

e.g.

INFO: Running manifest and explorers for __file/~oneadmin/.one/one_auth
INFO: Generating code for __file/~oneadmin/.one/one_auth
INFO: Executing code for __file/~oneadmin/.one/one_auth
mktemp: failed to create file via template ‘/~oneadmin/.one/one_auth.cdist.XXXXXXXXXX’: No such file or directory
ERROR: Command failed: /bin/sh -e /tmp/tmpy1vl_v/object/__file/~oneadmin/.one/one_auth/.cdist/code-local

it seems the only reason why this does not work is that the __file type prefixes the path with '/'.

We could only prefix path if it does not start with ~.
What do you think?

*Created by: asteven* e.g. ``` INFO: Running manifest and explorers for __file/~oneadmin/.one/one_auth INFO: Generating code for __file/~oneadmin/.one/one_auth INFO: Executing code for __file/~oneadmin/.one/one_auth mktemp: failed to create file via template ‘/~oneadmin/.one/one_auth.cdist.XXXXXXXXXX’: No such file or directory ERROR: Command failed: /bin/sh -e /tmp/tmpy1vl_v/object/__file/~oneadmin/.one/one_auth/.cdist/code-local ``` it seems the only reason why this does not work is that the __file type prefixes the path with '/'. We could only prefix path if it does not start with ~. What do you think?
Author
Owner

Created by: asteven

never mind, to much quoting issues.

*Created by: asteven* never mind, to much quoting issues.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#248
No description provided.