-
Notifications
You must be signed in to change notification settings - Fork 75
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
Adhere to freedesktop conventions (instead of ~/.restish) fixes #98 #177
Conversation
…or#98 * Handle migration from the old config directory (~/.restish) to the new standard location
Covers the case where the base config dir hasn't been created yet.
All test pass now: /go/src/restish # go test -coverprofile=coverage.txt -covermode=atomic ./...
go: downloading github.com/mattn/go-isatty v0.0.16
go: downloading golang.org/x/oauth2 v0.2.0
go: downloading github.com/danielgtaylor/casing v0.0.0-20210126043903-4e55e6373ac3
go: downloading github.com/danielgtaylor/mexpr v1.8.0
go: downloading github.com/danielgtaylor/shorthand/v2 v2.1.1
go: downloading github.com/hexops/gotextdiff v1.0.3
go: downloading github.com/logrusorgru/aurora v2.0.3+incompatible
go: downloading github.com/pb33f/libopenapi v0.4.18-0.20230121110523-de1a42c72ff4
go: downloading github.com/schollz/progressbar/v3 v3.12.2
go: downloading github.com/spf13/cobra v1.6.1
go: downloading github.com/spf13/afero v1.9.3
go: downloading github.com/spf13/viper v1.14.0
go: downloading github.com/zeebo/xxh3 v1.0.2
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/stretchr/testify v1.8.1
go: downloading gopkg.in/h2non/gock.v1 v1.1.2
go: downloading github.com/gosimple/slug v1.13.1
go: downloading github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb
go: downloading golang.org/x/exp v0.0.0-20230321023759-10a507213a29
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/AlecAivazis/survey/v2 v2.3.6
go: downloading github.com/alecthomas/chroma v0.10.0
go: downloading github.com/alexeyco/simpletable v1.0.0
go: downloading github.com/amzn/ion-go v1.1.3
go: downloading github.com/andybalholm/brotli v1.0.4
go: downloading github.com/charmbracelet/glamour v0.6.0
go: downloading github.com/eliukblau/pixterm v1.3.1
go: downloading github.com/fxamacker/cbor/v2 v2.4.0
go: downloading github.com/gbl08ma/httpcache v1.0.2
go: downloading github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
go: downloading github.com/iancoleman/strcase v0.2.0
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/shamaton/msgpack/v2 v2.1.1
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/tent/http-link-go v0.0.0-20130702225549-ac974c61c2f9
go: downloading golang.org/x/term v0.5.0
go: downloading golang.org/x/text v0.7.0
go: downloading golang.org/x/sys v0.5.0
go: downloading github.com/vmware-labs/yaml-jsonpath v0.3.2
go: downloading github.com/fsnotify/fsnotify v1.6.0
go: downloading github.com/spf13/cast v1.5.0
go: downloading github.com/spf13/jwalterweatherman v1.1.0
go: downloading github.com/klauspost/cpuid/v2 v2.0.9
go: downloading github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading github.com/gosimple/unidecode v1.0.1
go: downloading github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
go: downloading github.com/dlclark/regexp2 v1.7.0
go: downloading github.com/muesli/termenv v0.13.0
go: downloading github.com/yuin/goldmark v1.5.3
go: downloading github.com/yuin/goldmark-emoji v1.0.1
go: downloading github.com/microcosm-cc/bluemonday v1.0.21
go: downloading github.com/muesli/reflow v0.3.0
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/peterbourgon/diskv v2.0.1+incompatible
go: downloading github.com/x448/float16 v0.8.4
go: downloading github.com/disintegration/imaging v1.6.2
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading golang.org/x/image v0.5.0
go: downloading golang.org/x/net v0.7.0
go: downloading github.com/subosito/gotenv v1.4.1
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/magiconair/properties v1.8.6
go: downloading github.com/pelletier/go-toml/v2 v2.0.6
go: downloading github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936
go: downloading github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
go: downloading github.com/rivo/uniseg v0.4.3
go: downloading github.com/aymanbagabas/go-osc52 v1.2.1
go: downloading github.com/aymerick/douceur v0.2.0
go: downloading github.com/pelletier/go-toml v1.9.5
go: downloading github.com/google/btree v1.1.2
go: downloading github.com/gorilla/css v1.0.0
ok github.com/danielgtaylor/restish 0.027s coverage: 0.0% of statements [no tests to run]
? github.com/danielgtaylor/restish/oauth [no test files]
ok github.com/danielgtaylor/restish/bulk 2.818s coverage: 84.0% of statements
ok github.com/danielgtaylor/restish/cli 0.514s coverage: 75.3% of statements
ok github.com/danielgtaylor/restish/openapi 0.100s coverage: 94.0% of statements |
Just wanted to mention I have this PR running locally and have run into a couple of minor issues I'm trying to sort out, as well as updating the docs for all the different locations the files can now be (which is operating-system dependent unfortunately). |
Happy to help if you mention the issues you've found :) |
Yeah, the one time only migration is a good idea. Do you want me to merge this changes into my branch and update this PR or close it? |
I've gone ahead and merged the other PR and closed this one. I'll let it bake in |
This PR attempt to address #98 in a backwards compatible fashion