Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
override update id
Browse files Browse the repository at this point in the history
  • Loading branch information
fwang committed May 29, 2024
1 parent d87e37d commit 05e099d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/project/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ var ErrPassphraseInvalid = fmt.Errorf("passphrase invalid")
func (s *stack) Run(ctx context.Context, input *StackInput) error {
slog.Info("running stack command", "cmd", input.Command)

updateID := cuid2.Generate()
updateID := os.Getenv("SST_UPDATE_ID")
if updateID == "" || !cuid2.IsCuid(updateID) || len(updateID) != cuid2.DefaultIdLength{
updateID = cuid2.Generate()
}
err := s.Lock(updateID, input.Command)
if err != nil {
if err == provider.ErrLockExists {
Expand Down

0 comments on commit 05e099d

Please sign in to comment.