Skip to content

Commit

Permalink
Add warning about using an outdated buildscript.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Sep 26, 2024
1 parent 7e2bdf1 commit 59bbc83
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/captain/rationalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/ActiveState/cli/internal/errs"
"github.com/ActiveState/cli/internal/locale"
"github.com/ActiveState/cli/internal/runbits/rationalize"
"github.com/ActiveState/cli/pkg/buildscript"
"github.com/ActiveState/cli/pkg/localcommit"
)

Expand All @@ -31,5 +32,11 @@ func rationalizeError(err *error) {
*err = errs.WrapUserFacing(*err,
locale.Tr("err_commit_id_invalid", errInvalidCommitID.CommitID),
errs.SetInput())

// Outdated build script.
case errors.Is(*err, buildscript.ErrOutdatedAtTime):
*err = errs.WrapUserFacing(*err,
locale.T("err_outdated_buildscript"),
errs.SetInput())
}
}
2 changes: 2 additions & 0 deletions internal/locale/locales/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1371,6 +1371,8 @@ err_commit_id_invalid_given:
other: "Invalid commit ID: '{{.V0}}'."
err_commit_id_not_in_history:
other: "The project '[ACTIONABLE]{{.V0}}[/RESET]' does not contain the provided commit: '[ACTIONABLE]{{.V1}}[/RESET]'."
err_outdated_buildscript:
other: "[WARNING]Warning:[/RESET] You are using an outdated version of the buildscript. Please run '[ACTIONABLE]state reset LOCAL[/RESET]' in order to reinitialize your buildscript file."
err_shortcutdir_writable:
other: Could not continue as we don't have permission to create [ACTIONABLE]{{.V0}}[/RESET].
move_prompt:
Expand Down

0 comments on commit 59bbc83

Please sign in to comment.