1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 10:18:49 +00:00
Commit Graph

560 Commits

Author SHA1 Message Date
deadc0de6
45a1db6702 refactoring cfg_yaml 2020-08-07 14:49:17 +02:00
deadc0de6
4bf00d7099 refactoring cfg_yaml 2020-07-26 19:47:29 +02:00
deadc0de6
0752c7e4ea fix exception handling 2020-07-26 17:58:50 +02:00
deadc0de6
0708e2376e adding command line to debug logs 2020-07-26 16:25:07 +02:00
deadc0de6
8202cf6106 refactoring cfg_yaml 2020-07-26 14:59:27 +02:00
deadc0de6
c36854f250 propagate undefined variable exception 2020-07-14 20:32:05 +02:00
deadc0de6
7775184d06 fix missing variables 2020-07-13 21:37:53 +02:00
deadc0de6
e3b7359b95 better handle variables and raise exception when an used variable is undefined 2020-07-13 21:07:13 +02:00
Davide Laezza
fb69e154c4 Moving execution of dynamic variables and merging of dynvariables/variables after the include loop in _rec_resolve_profile_include 2020-07-05 22:09:45 +02:00
deadc0de6
8bfdfa2826 fix bug #246 2020-07-03 10:14:25 +02:00
deadc0de6
c48ea15a7c fix bug in profile inheritance 2020-07-02 14:33:41 +02:00
deadc0de6
e8f4d9afe8 debug log improvements 2020-06-23 10:25:30 +02:00
deadc0de6
64ec4ae024 bump version 2020-06-14 14:40:28 +02:00
deadc0de6
9ccf27765f fix dry for 237 2020-06-11 22:56:12 +02:00
deadc0de6
18a61bce60 remove cp as a dependency 2020-05-31 11:06:31 +02:00
deadc0de6
1cbde27ed3 fix indentation 2020-05-31 10:42:49 +02:00
Kristof Lünenschloß
ffd6f4153e Replace cp with shutils functions for import
This allows the import to work on systems without GNU coreutils
installed (e.g. macOS, where only BSD cp is available by default).
For BSD specifically, the `-T` flag is missing in `cp`.
2020-05-30 21:12:17 +02:00
deadc0de6
6474a48961 fix patch rights issue for #234 2020-05-29 10:58:33 +02:00
deadc0de6
126862bf6d fix bug #233 2020-05-28 09:45:05 +02:00
deadc0de6
c29fb58700 fix mkdir error when create is false in config 2020-05-22 10:19:39 +02:00
Arthur Grosso
43e286a638 silent action #228 2020-05-08 17:07:25 +02:00
deadc0de
fb9410eda6 Merge pull request #227 from deadc0de6/templatenotfound
Templatenotfound
2020-05-03 19:18:13 +02:00
deadc0de6
aab4492556 fix bug for #225 2020-05-03 17:58:29 +02:00
deadc0de6
ef4c48cadd add dependency checks for #225 2020-05-03 15:06:59 +02:00
deadc0de6
9f27c6bc48 fix templatenotfound for #226 2020-05-03 14:40:37 +02:00
deadc0de6
7b0575e679 bump version 2020-05-02 10:49:14 +02:00
deadc0de
df83efe8bc Merge pull request #222 from deadc0de6/import-as
Import as
2020-04-16 18:23:20 +02:00
deadc0de6
8179e0e7e2 fix import as tild issue #220 2020-04-14 20:50:08 +02:00
deadc0de6
902a4036cb fix empty profile or empty profile dotfiles for #221 2020-04-14 17:57:22 +02:00
deadc0de6
40e970465b implement import --as for #220 2020-04-11 14:46:10 +02:00
deadc0de6
054ba21019 reorg usage 2020-04-10 14:07:05 +02:00
deadc0de6
1e5eeaca9b refactoring 2020-04-10 14:02:16 +02:00
deadc0de6
79431e0976 refactoring 2020-04-10 13:48:04 +02:00
Davide Laezza
f26cd16dfe Removing redundant path existence checks in _load_yaml and _import_sub 2020-03-22 12:50:02 +01:00
deadc0de6
e53a7d5229 refactor for #212 2020-03-22 07:46:59 +01:00
Davide Laezza
566d2baac4 Using rpartition to split attributes in import paths 2020-03-21 17:49:11 +01:00
Davide Laezza
17cc6bd33a Fixing :optional import attribute for globbed paths 2020-03-21 14:52:41 +01:00
deadc0de6
68022a5fc6 bump version 2020-03-12 08:10:11 +01:00
Davide Laezza
eeccd78ade Fixing custom filters and functions paths 2020-02-22 17:08:09 +01:00
deadc0de6
fb071321e9 add func_file and filter_file for the config (for #210) 2020-02-15 13:05:17 +01:00
deadc0de6
7498be51b6 allow empty src/dst for dotfiles 2020-01-29 14:51:48 +01:00
deadc0de6
873a22bab6 ensure profile dotfiles is not None 2020-01-29 14:09:50 +01:00
deadc0de6
d54f0eb465 fix diff default 2020-01-27 08:02:28 +01:00
deadc0de6
7bf9672758 bump version 2020-01-26 19:58:53 +01:00
deadc0de6
0e421c7908 default to unified diff 2020-01-26 19:54:25 +01:00
deadc0de6
99150cec88 remove "import shlex" to pass tests 2020-01-26 19:37:52 +01:00
Sighery
704f8deab6 Use alternative list-based diff_cmd escaping
The previous escaping method of wrapping the arguments with double
quotes would eventually fail in some cases, since Linux allows pretty
much any character for a filename.

Using a different quoting character, like the single quote would have
brought you back to the exact same issue. As soon as any part of the
path contained your escape quote character, the code would break.

The code would use `shlex`, a parser for Linux shells. However, this
wasn't working since even that wouldn't know where your argument began
and ended, since it wasn't escaped properly. Meaning, a string like:

`diff -r /home/test/.config/Code - OSS/t"t't.test mytestfile.test`

Would then break any of the quoting solutions. And shlex, since it
wouldn't know where arguments start and end, it would think an
argument ends at `home/test/.config/Code`, since the spaces haven't
been escaped. But escaping the spaces with quote characters is not a
good idea since any parts of the path with those quote arguments would
then again break shlex and it wouldn't be able to tell when your
argument starts and ends.

The solution for that is to, before we replace our diff template
string with the given files arguments, we can just split it by
whitespace, and manually replace the `{0}` and `{1}` placeholders.
This allows us to keep the separation with a Python list. What does
this mean? That when you then call `subprocess.Popen` with this list,
`subprocess` knows where all your arguments start and end, even if
they themselves are not properly escaped. But since it's all split in
a list, `subprocess` has a concept of what is a single argument and
would apply the needed escaping to each individual argument.
2020-01-26 12:28:28 +01:00
deadc0de6
40a9872f56 quote diff command arguments (#203) 2020-01-26 11:21:14 +01:00
deadc0de6
98911550df fix quotes in arguments for #203 2020-01-23 08:27:44 +01:00
deadc0de6
d4375c5d04 adding ability to provide diff command for #203 2020-01-22 17:41:48 +01:00