Skip to content

Commit 0caa19a

Browse files
authored
Fix Go debug mode (#232)
1 parent 165f92f commit 0caa19a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

aws_lambda_builders/workflows/go_modules/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def build(self, source_dir_path, output_path):
4949
cmd = [runtime_path, "build"]
5050
if self.mode and self.mode.lower() == BuildMode.DEBUG:
5151
LOG.debug("Debug build requested: Setting configuration to Debug")
52-
cmd += ["-gcflags='all=-N -l'"]
52+
cmd += ["-gcflags", "all=-N -l"]
5353
cmd += ["-o", output_path, source_dir_path]
5454

5555
p = self.osutils.popen(cmd, cwd=source_dir_path, env=env, stdout=self.osutils.pipe, stderr=self.osutils.pipe)

tests/unit/workflows/go_modules/test_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_debug_configuration_set(self):
5454
self.under_test = GoModulesBuilder(self.osutils, self.binaries, "Debug")
5555
self.under_test.build("source_dir", "output_path")
5656
self.osutils.popen.assert_called_with(
57-
["/path/to/go", "build", "-gcflags='all=-N -l'", "-o", "output_path", "source_dir"],
57+
["/path/to/go", "build", "-gcflags", "all=-N -l", "-o", "output_path", "source_dir"],
5858
cwd="source_dir",
5959
env={"GOOS": "linux", "GOARCH": "amd64"},
6060
stderr="PIPE",

0 commit comments

Comments
 (0)