-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cosmovisor): fixed cosmovisor add-upgrade permissions #20062
Changes from all commits
9751b9d
d119102
f29a766
e81cdd5
905649b
affe403
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -35,6 +35,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ | |||
# Changelog | ||||
|
||||
## [Unreleased] | ||||
* [#20062](https://github.com/cosmos/cosmos-sdk/pull/20062) Fixed cosmovisor add-upgrade permissions | ||||
|
||||
|
||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Multiple consecutive blank lines detected. It's best to maintain a single blank line to keep the file clean and organized. 40d39 Committable suggestion
Suggested change
|
||||
## v1.5.0 - 2023-07-17 | ||||
|
||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
"fmt" | ||
"os" | ||
"path" | ||
"path/filepath" | ||
"strings" | ||
|
||
"github.com/spf13/cobra" | ||
|
@@ -54,7 +53,7 @@ | |
|
||
// create upgrade dir | ||
upgradeLocation := cfg.UpgradeDir(upgradeName) | ||
if err := os.MkdirAll(path.Join(upgradeLocation, "bin"), 0o750); err != nil { | ||
if err := os.MkdirAll(path.Join(upgradeLocation, "bin"), 0o755); err != nil { | ||
|
||
return fmt.Errorf("failed to create upgrade directory: %w", err) | ||
} | ||
|
||
|
@@ -94,7 +93,7 @@ | |
return err | ||
} | ||
|
||
logger.Info(fmt.Sprintf("%s created, %s upgrade binary will switch at height %d", filepath.Join(cfg.UpgradeInfoFilePath(), upgradetypes.UpgradeInfoFilename), upgradeName, upgradeHeight)) | ||
logger.Info(fmt.Sprintf("%s created, %s upgrade binary will switch at height %d", cfg.UpgradeInfoFilePath(), upgradeName, upgradeHeight)) | ||
} | ||
|
||
return nil | ||
|
@@ -110,7 +109,8 @@ | |
return fmt.Errorf("failed to check if file exists: %w", err) | ||
} | ||
|
||
if err := os.WriteFile(path, data, 0o600); err != nil { | ||
//nolint:gosec // We need broader permissions to make it executable | ||
if err := os.WriteFile(path, data, 0o755); err != nil { | ||
|
||
return fmt.Errorf("failed to write binary to location: %w", err) | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure the changelog entry is surrounded by blank lines for better readability and adherence to the changelog guidelines.
Committable suggestion
The changelog entry for PR #20062 could be more descriptive. Consider specifying what was fixed and why it's important.
Committable suggestion