fix: mkdirall and nushell comments
ci/woodpecker/push/goreleaser Pipeline was successful
Details
ci/woodpecker/push/goreleaser Pipeline was successful
Details
Signed-off-by: jolheiser <john.olheiser@gmail.com>main v0.0.4
parent
39d0df69d2
commit
5fc404783e
|
@ -2,11 +2,13 @@ def keys [] {
|
||||||
^kv list | lines | each { |line| $line | str trim }
|
^kv list | lines | each { |line| $line | str trim }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Get a value
|
||||||
export extern "kv get" [
|
export extern "kv get" [
|
||||||
key: string@keys # Key
|
key: string@keys # Key
|
||||||
--store(-s) # Use a specific store instead of aggregate
|
--store(-s) # Use a specific store instead of aggregate
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Set a value
|
||||||
export extern "kv set" [
|
export extern "kv set" [
|
||||||
key: string # Key
|
key: string # Key
|
||||||
value: string # Value
|
value: string # Value
|
||||||
|
@ -14,11 +16,13 @@ export extern "kv set" [
|
||||||
--store(-s) # Store for this key/value
|
--store(-s) # Store for this key/value
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Delete a value
|
||||||
export extern "kv del" [
|
export extern "kv del" [
|
||||||
key: string@keys # Key
|
key: string@keys # Key
|
||||||
--store(-s) # Store for this key/value
|
--store(-s) # Store for this key/value
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# List keys and values
|
||||||
export extern "kv list" [
|
export extern "kv list" [
|
||||||
prefix?: string # Key prefix filter
|
prefix?: string # Key prefix filter
|
||||||
--store(-s) # Use a specific store instead of aggregate
|
--store(-s) # Use a specific store instead of aggregate
|
||||||
|
|
3
main.go
3
main.go
|
@ -261,6 +261,9 @@ func (a *app) load() (store, error) {
|
||||||
if !errors.Is(err, fs.ErrNotExist) {
|
if !errors.Is(err, fs.ErrNotExist) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if err := os.MkdirAll(*a.storeLocation, os.ModePerm); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
fi, err := os.Create(defaultConfig)
|
fi, err := os.Create(defaultConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue