diff --git a/internal/runbits/requirements/requirements.go b/internal/runbits/requirements/requirements.go index ad2ab06a22..03c8515564 100644 --- a/internal/runbits/requirements/requirements.go +++ b/internal/runbits/requirements/requirements.go @@ -109,7 +109,7 @@ func (r *RequirementOperation) ExecuteRequirementOperation(requirementName, requ switch nsType { case model.NamespacePackage, model.NamespaceBundle: commitID, err := localcommit.Get(r.Project.Dir()) - if err != nil && !localcommit.IsFileDoesNotExistError(err) { + if err != nil { return errs.Wrap(err, "Unable to get local commit") } @@ -191,7 +191,7 @@ func (r *RequirementOperation) ExecuteRequirementOperation(requirementName, requ } parentCommitID, err := localcommit.Get(r.Project.Dir()) - if err != nil && !localcommit.IsFileDoesNotExistError(err) { + if err != nil { return errs.Wrap(err, "Unable to get local commit") } hasParentCommit := parentCommitID != "" diff --git a/internal/runners/pull/pull.go b/internal/runners/pull/pull.go index 2234aee863..586f3569d9 100644 --- a/internal/runners/pull/pull.go +++ b/internal/runners/pull/pull.go @@ -99,7 +99,7 @@ func (p *Pull) Run(params *PullParams) error { var localCommit *strfmt.UUID localCommitID, err := localcommit.Get(p.project.Dir()) - if err != nil && !localcommit.IsFileDoesNotExistError(err) { + if err != nil { return errs.Wrap(err, "Unable to get local commit") } if localCommitID != "" { @@ -151,7 +151,7 @@ func (p *Pull) Run(params *PullParams) error { } commitID, err := localcommit.Get(p.project.Dir()) - if err != nil && !localcommit.IsFileDoesNotExistError(err) { + if err != nil { return errs.Wrap(err, "Unable to get local commit") } diff --git a/internal/runners/push/push.go b/internal/runners/push/push.go index c21a9765ed..20367586ec 100644 --- a/internal/runners/push/push.go +++ b/internal/runners/push/push.go @@ -298,7 +298,7 @@ func (r *Push) verifyInput() error { } commitID, err := localcommit.Get(r.project.Dir()) - if err != nil && !localcommit.IsFileDoesNotExistError(err) { + if err != nil { return errs.Wrap(err, "Unable to get local commit") } if commitID == "" { diff --git a/test/integration/package_int_test.go b/test/integration/package_int_test.go index f15c01a3f7..87a2ab0cc5 100644 --- a/test/integration/package_int_test.go +++ b/test/integration/package_int_test.go @@ -470,6 +470,11 @@ func (suite *PackageIntegrationTestSuite) TestJSON() { cp.ExpectExitCode(0) AssertValidJSON(suite.T(), cp) + cp = ts.Spawn("checkout", "ActiveState-CLI/Perl-5.32", ".") + cp.Expect("Skipping runtime setup") + cp.Expect("Checked out project") + cp.ExpectExitCode(0) + cp = ts.SpawnWithOpts( e2e.OptArgs("checkout", "ActiveState-CLI/Packages-Perl", "."), ) diff --git a/test/integration/pull_int_test.go b/test/integration/pull_int_test.go index 2861d128c7..d16923cbee 100644 --- a/test/integration/pull_int_test.go +++ b/test/integration/pull_int_test.go @@ -24,7 +24,7 @@ func (suite *PullIntegrationTestSuite) TestPull() { ts := e2e.New(suite.T(), false) defer ts.Close() - ts.PrepareProject("ActiveState-CLI/Python3", "") + ts.PrepareProject("ActiveState-CLI/Python3", "59404293-e5a9-4fd0-8843-77cd4761b5b5") cp := ts.Spawn("pull") cp.Expect("Operating on project") diff --git a/test/integration/push_int_test.go b/test/integration/push_int_test.go index f683b8fb71..f12b75524f 100644 --- a/test/integration/push_int_test.go +++ b/test/integration/push_int_test.go @@ -264,24 +264,6 @@ func (suite *PushIntegrationTestSuite) TestPush_NoChanges() { } } -func (suite *PushIntegrationTestSuite) TestPush_NoCommit() { - suite.OnlyRunForTags(tagsuite.Push) - - ts := e2e.New(suite.T(), false) - defer ts.Close() - - ts.PrepareProject("ActiveState-CLI/cli", "") - - ts.LoginAsPersistentUser() - cp := ts.SpawnWithOpts(e2e.OptArgs("push")) - cp.Expect("nothing to push") - cp.ExpectExitCode(1) - - if strings.Count(cp.Snapshot(), " x ") != 1 { - suite.Fail("Expected exactly ONE error message, got: ", cp.Snapshot()) - } -} - func (suite *PushIntegrationTestSuite) TestPush_NameInUse() { suite.OnlyRunForTags(tagsuite.Push)