summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-09-01 21:24:48 -0400
committerKyle Meyer <kyle@kyleam.com>2016-09-01 21:24:48 -0400
commit33a7c90f333a1e71124c15f9e6bcc82ef1423c93 (patch)
tree3c9a1937994f311a0f13a49ec7ac3d5bdf6e2808
parent6b39982b66f8b37e9999859ddd4302e93c5afbd3 (diff)
downloadsnakemake-mode-33a7c90f333a1e71124c15f9e6bcc82ef1423c93.tar.gz
snakemake-check-target: Adjust for upstream output
As of Snakemake v3.8.0, using a wildcard rule name signals a key error: Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/snakemake/io.py", line 401, in format_match value = wildcards[name] KeyError: 'name'
-rw-r--r--snakemake.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/snakemake.el b/snakemake.el
index 61cfa24..9a93f9e 100644
--- a/snakemake.el
+++ b/snakemake.el
@@ -262,11 +262,11 @@ The file list is determined by the output of
"Return non-nil if TARGET is a valid target for DIRECTORY's Snakefile."
(snakemake-with-cache directory (target)
(with-temp-buffer
- (snakemake-insert-output "--quiet" "--dryrun" target)
- (goto-char (point-min))
- ;; Lean towards misclassifying targets as valid rather than
- ;; silently dropping valid targets as invalid.
- (not (re-search-forward snakemake-invalid-target-re nil t)))))
+ (when (= 0 (snakemake-insert-output "--quiet" "--dryrun" target))
+ (goto-char (point-min))
+ ;; Lean towards misclassifying targets as valid rather than
+ ;; silently dropping valid targets as invalid.
+ (not (re-search-forward snakemake-invalid-target-re nil t))))))
(declare-function org-element-context "org-element")
(declare-function org-element-property "org-element")