Skip to content

Commit 0fba2c2

Browse files
committed
resolve #77
1 parent c3d5e60 commit 0fba2c2

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

config/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ function A(a) {
108108
if(a.pass_key === undefined) { throw "auth pass_key undefined"; }
109109
110110
STATE.auths.push(a);
111+
112+
return a.name;
111113
}
112114
`)
113115

config/config_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,25 @@ func Test_applyFileTargets(t *testing.T) {
4242
{Name: "2", RepoURL: "https://github.com/Southclaws/project2", Up: []string{"sleep"}, Env: map[string]string{}},
4343
{Name: "3", RepoURL: "https://github.com/Southclaws/project3", Up: []string{"sleep"}, Env: map[string]string{}},
4444
}, false},
45+
{"auth", `
46+
var auther = A({
47+
name: "auth",
48+
path: "path",
49+
user_key: "user_key",
50+
pass_key: "pass_key"
51+
});
52+
53+
T({
54+
name: "name",
55+
url: "../test.local",
56+
up: ["echo", "hello world"],
57+
auth: auther,
58+
});
59+
60+
console.log("done!");
61+
`, task.Targets{
62+
{Name: "name", RepoURL: "../test.local", Up: []string{"echo", "hello world"}, Env: map[string]string{}, Auth: "auth"},
63+
}, false},
4564
{"envmap", `
4665
var url = "https://github.com/Southclaws/";
4766

0 commit comments

Comments
 (0)