Skip to content

Commit 2cb49bb

Browse files
author
Patrick Thomson
authored
dap-go: fix type error when splitting :args field (#460)
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.
1 parent 64a2ee9 commit 2cb49bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dap-go.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
))
6565

6666

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

6969
(-> conf
7070
(dap--put-if-absent :dap-server-path dap-go-debug-program)

0 commit comments

Comments
 (0)