From 33a7c90f333a1e71124c15f9e6bcc82ef1423c93 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 1 Sep 2016 21:24:48 -0400 Subject: 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' --- snakemake.el | 10 +++++----- 1 file 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") -- cgit v1.2.3