Skip to content

Commit 21d360e

Browse files
committed
Fixed panic and failing 'state run' integration test.
1 parent fb35d48 commit 21d360e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

pkg/projectfile/projectfile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ func parse(configFilepath string) (*Project, error) {
457457
if err2 != nil {
458458
return nil, &ErrorParseProject{locale.NewInputError(
459459
"err_project_parsed",
460-
"Project file `{{.V1}}` could not be parsed, the parser produced the following error: {{.V0}}", err.Error(), configFilepath),
460+
"Project file `{{.V1}}` could not be parsed, the parser produced the following error: {{.V0}}", err2.Error(), configFilepath),
461461
}
462462
}
463463

test/integration/run_int_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func (suite *RunIntegrationTestSuite) createProjectFile(ts *e2e.Session, pythonV
3131
fileutils.CopyFile(interruptScript, filepath.Join(ts.Dirs.Work, "interrupt.go"))
3232

3333
// ActiveState-CLI/Python3 is just a place-holder that is never used
34-
configFileContent := strings.TrimSpace(fmt.Sprintf(`
34+
configFileContent := strings.TrimPrefix(fmt.Sprintf(`
3535
project: https://platform.activestate.com/ActiveState-CLI/Python%d?commitID=fbc613d6-b0b1-4f84-b26e-4aa5869c4e54
3636
scripts:
3737
- name: test-interrupt
@@ -65,7 +65,7 @@ scripts:
6565
value: |
6666
exit 123
6767
standalone: true
68-
`, pythonVersion))
68+
`, pythonVersion), "\n")
6969

7070
ts.PrepareActiveStateYAML(configFileContent)
7171
}
@@ -266,9 +266,9 @@ func (suite *RunIntegrationTestSuite) TestRun_BadLanguage() {
266266
defer asyFile.Close()
267267

268268
_, err = asyFile.WriteString(strings.TrimPrefix(`
269-
- name: badLanguage
270-
language: bax
271-
value: echo "shouldn't show"
269+
- name: badLanguage
270+
language: bax
271+
value: echo "shouldn't show"
272272
`, "\n"))
273273
suite.Require().NoError(err, "extra config is appended")
274274

0 commit comments

Comments
 (0)