Skip to content
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

Bug when deleting secret named identically to a path #29

Closed
vikin91 opened this issue Jun 10, 2020 · 3 comments · Fixed by #32
Closed

Bug when deleting secret named identically to a path #29

vikin91 opened this issue Jun 10, 2020 · 3 comments · Fixed by #32
Assignees
Labels
bug Something isn't working

Comments

@vikin91
Copy link
Contributor

vikin91 commented Jun 10, 2020

Affects version: 0.5.0, Mac

Here a scenario to reproduce:

https://vault.example.com/ /secret/apps/> ls
...
dev
dev/
...

# I want to remove `dev` but keep `dev/`
https://vault.example.com/ /secret/apps/> rm dev
Removed /secret/apps/dev/xxx/yyy
# BUG: `dev/` is being deleted - should delete `dev`

# try the same with context menu - selecting proper item with <tab>-key menu
https://vault.example.com/ /secret/apps/> rm dev
Removed /secret/apps/dev/xxx/yyy
# BUG: `dev/` is being deleted - should delete `dev`
@fishi0x01 fishi0x01 self-assigned this Jun 10, 2020
@fishi0x01 fishi0x01 added the bug Something isn't working label Jun 10, 2020
@fishi0x01
Copy link
Owner

Because of the reference in the PR, GH automatically closed the issue ..
I have added some tests which confirmed the bug and implemented/merged a fix.

Re-opening this issue until you can confirm it works as you expect.

@fishi0x01 fishi0x01 reopened this Jun 10, 2020
@vikin91
Copy link
Contributor Author

vikin91 commented Jun 11, 2020

I will test this using a build from master.

Side note: I need to patch Makefile every time I build, because it results in errors on Mac. I will fix it in my PR, but here is how it looks like:

$ make cross-compile

rm ./build/* || true
mkdir -p ./build/
for GOOS in linux darwin; do \
	  for GOARCH in 386 amd64; do \
	  	export GOOS=$GOOS; \
		export GOARCH=$GOARCH; \
	    go build -ldflags "-X main.vshVersion=-n v0.5.0" -o build/vsh_${GOOS}_${GOARCH}; \
	  done \
	done
# github.com/fishi0x01/vsh
usage: link [options] main.o
...

Note this part: go build -ldflags "-X main.vshVersion=-n v0.5.0" - the -n should not be there :)

Consider using VERSION := $(shell git describe --tags --always --dirty) for discovering git version in one line.

@vikin91
Copy link
Contributor Author

vikin91 commented Jun 11, 2020

Okay, I can confirm that the original bug is fixed now! Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants