mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 15:39:43 +00:00
fix cicd
This commit is contained in:
@@ -639,19 +639,19 @@ class CfgYaml:
|
||||
if len(val) < 3:
|
||||
err = 'bad format for chmod: {}'.format(val)
|
||||
self._log.err(err)
|
||||
raise YamlException('dotfile chmod error: {}'.format(err))
|
||||
raise YamlException(err)
|
||||
try:
|
||||
int(val)
|
||||
except Exception:
|
||||
err = 'bad format for chmod: {}'.format(val)
|
||||
self._log.err(err)
|
||||
raise YamlException('dotfile chmod error: {}'.format(err))
|
||||
raise YamlException(err)
|
||||
for x in val:
|
||||
y = int(x)
|
||||
if y < 0 or y > 7:
|
||||
err = 'bad format for chmod: {}'.format(val)
|
||||
self._log.err(err)
|
||||
raise YamlException('dotfile chmod error: {}'.format(err))
|
||||
raise YamlException(err)
|
||||
|
||||
return new
|
||||
|
||||
|
||||
@@ -501,7 +501,7 @@ def cmd_importer(o):
|
||||
shutil.copy2(dst, srcf)
|
||||
|
||||
chmod = None
|
||||
if o.import_mode or perm&o.umask:
|
||||
if o.import_mode or perm & o.umask:
|
||||
# insert chmod
|
||||
chmod = perm
|
||||
retconf = o.conf.new(src, dst, linktype, chmod=chmod)
|
||||
|
||||
@@ -80,7 +80,7 @@ Options:
|
||||
-k --key Treat <path> as a dotfile key.
|
||||
-l --link=<link> Link option (nolink|link|link_children).
|
||||
-L --file-only Do not show diff but only the files that differ.
|
||||
-m --preserve-mode Insert a chmod entry in the dotfile with its permissions.
|
||||
-m --preserve-mode Insert a chmod entry in the dotfile with its mode.
|
||||
-n --nodiff Do not diff when installing.
|
||||
-p --profile=<profile> Specify the profile to use [default: {}].
|
||||
-P --show-patch Provide a one-liner to manually patch template.
|
||||
|
||||
@@ -308,7 +308,7 @@ def get_umask():
|
||||
"""return current umask value"""
|
||||
cur = os.umask(0)
|
||||
os.umask(cur)
|
||||
return 0o777-cur
|
||||
return 0o777 - cur
|
||||
|
||||
|
||||
def get_file_perm(path):
|
||||
|
||||
@@ -132,6 +132,7 @@ def _fake_args():
|
||||
args['--as'] = None
|
||||
args['--file-only'] = False
|
||||
args['--workers'] = 1
|
||||
args['--preserve-mode'] = False
|
||||
# cmds
|
||||
args['profiles'] = False
|
||||
args['files'] = False
|
||||
|
||||
Reference in New Issue
Block a user