We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f63e1d commit 176ea32Copy full SHA for 176ea32
get_hg_test.go
@@ -110,9 +110,10 @@ func TestHgGetter_HgArgumentsNotAllowed(t *testing.T) {
110
111
g := new(HgGetter)
112
113
- // If arguments are allowed in the destination, this Get call will fail
114
- dst := "--config=alias.clone=!false"
115
- defer func() { _ = os.RemoveAll(dst) }()
+ // Test that destination paths that look like hg arguments are treated as literal paths
+ // Create the problematic directory name inside a temp directory for cleanup
+ tempBase := t.TempDir()
116
+ dst := filepath.Join(tempBase, "--config=alias.clone=!false")
117
err := g.Get(dst, testModuleURL("basic-hg"))
118
if err != nil {
119
t.Fatalf("Expected no err, got: %s", err)
0 commit comments