Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ Prasmoid provides a comprehensive set of commands to manage your plasmoid projec
| `regen types` | Regenerates `prasmoid.d.ts`. | `prasmoid regen types` |
| `regen config` | Regenerates `prasmoid.config.js`. | `prasmoid regen config` |
| `upgrade` | Updates Prasmoid itself to the latest version. | `prasmoid upgrade` |
| `version` | Shows the current version of Prasmoid. | `prasmoid version` |

## Extending Prasmoid with Custom Commands

Expand Down
33 changes: 0 additions & 33 deletions cmd/version/version.go

This file was deleted.

28 changes: 0 additions & 28 deletions cmd/version/version_test.go

This file was deleted.

6 changes: 3 additions & 3 deletions update
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ -z "$LATEST_RELEASE_INFO" ]; then
log_fail "Failed to fetch release info from GitHub."
fi

CURRENT_VERSION=$("$CURRENT_EXE" version)
CURRENT_VERSION=$("$CURRENT_EXE" --version)
RAW_CURRENT_VERSION=$(echo "$CURRENT_VERSION" | sed "s/-portable//")
IS_PORTABLE=false
if [[ "$CURRENT_VERSION" == *"-portable"* ]]; then
Expand Down Expand Up @@ -89,7 +89,7 @@ mv "$TEMP_FILE" "$CURRENT_EXE"

log_done "Update complete $LATEST_VERSION ($LATEST_HASH)"

log_step "Relaunching CLI..."
exec "$CURRENT_EXE"
# log_step "Relaunching CLI..."
# exec "$CURRENT_EXE"

exit 0
9 changes: 0 additions & 9 deletions utils/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,36 +364,27 @@ func LoadConfigRC() types.Config {

data, err := os.ReadFile(configFileName)
if err != nil {
color.Yellow("Configuration file (prasmoid.config.js) not found.\n" +
"Run 'prasmoid regen config'\n")
return defaultConfig
}
vm := runtime.NewRuntime()
_, err = vm.RunString(string(data))
if err != nil {
color.Yellow("Failed to load configuration file (prasmoid.config.js).\n" +
"Run 'prasmoid regen config'\n")
return defaultConfig
}
config := vm.Get("config")
if config == nil {
color.Yellow("Failed to load configuration file (prasmoid.config.js).\n" +
"Run 'prasmoid regen config'\n")
return defaultConfig
}

// Convert to JSON bytes
configBytes, err := json.Marshal(config.Export())
if err != nil {
color.Yellow("Failed to load configuration file (prasmoid.config.js).\n" + "Run 'prasmoid regen config'\n")
return defaultConfig
}

// Unmarshal into Config struct
var result types.Config
if err := json.Unmarshal(configBytes, &result); err != nil {
color.Yellow("Failed to load configuration file (prasmoid.config.js).\n" +
"Run 'prasmoid regen config'\n")
return defaultConfig
}

Expand Down
Loading