Skip to content

Commit

Permalink
dap-go: fix type error when splitting :args field (#460)
Browse files Browse the repository at this point in the history
If the :args field is already present in a given configuration, the
code tries to call `split-string` on that field, which is appropriate
to do once but will fail on subsequent calls, such as those
encountered when running `dap-debug-last`. Changing the conditional
here from a nil check to a `stringp` check worked for me.
  • Loading branch information
patrickt authored Apr 5, 2021
1 parent 64a2ee9 commit 2cb49bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dap-go.el
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
))


(if (plist-get conf :args) (plist-put conf :args (split-string (plist-get conf :args))) ())
(if (stringp (plist-get conf :args)) (plist-put conf :args (split-string (plist-get conf :args))) ())

(-> conf
(dap--put-if-absent :dap-server-path dap-go-debug-program)
Expand Down

0 comments on commit 2cb49bb

Please sign in to comment.