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

Print user friendly error if there is not files for uploads #41

Open
dimitrystd opened this issue Sep 27, 2017 · 0 comments
Open

Print user friendly error if there is not files for uploads #41

dimitrystd opened this issue Sep 27, 2017 · 0 comments
Milestone

Comments

@dimitrystd
Copy link

Steps

  • My workspace for tests has the single xml file in the subfolder. In other words
$ ls
dir1		smartling.yml
$ ls dir1/dir11/
test.xml
  • Try to upload all files
$ smartling-cli files push
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
main.redactedWriter.Write(0xc420134900, 0x3, 0x4, 0xc42009a500, 0xfa, 0x100, 0x13f5a00, 0xc420298240, 0xc42003dd88)
	/go/src/cli/redacted_log.go:54 +0x2f5
main.(*redactedWriter).Write(0xc420124000, 0xc42009a500, 0xfa, 0x100, 0x0, 0x0, 0x0)
	<autogenerated>:1 +0x74
fmt.Fprintln(0x15d6e80, 0xc420124000, 0xc42003dd88, 0x1, 0x1, 0x37, 0x0, 0x0)
	/usr/local/go/src/fmt/print.go:248 +0x8b
main.reportError(0x15d85c0, 0xc420134b00)
	/go/src/cli/main.go:240 +0xbf
main.main()
	/go/src/cli/main.go:232 +0x3ea
  • Ok, try to upload files by mask
$ smartling-cli files push *.xml
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
main.redactedWriter.Write(0xc420106900, 0x3, 0x4, 0xc420182120, 0x87, 0x90, 0x13f5a00, 0xc420284300, 0xc42003dd88)
	/go/src/cli/redacted_log.go:54 +0x2f5
main.(*redactedWriter).Write(0xc420102020, 0xc420182120, 0x87, 0x90, 0x0, 0x0, 0x0)
	<autogenerated>:1 +0x74
fmt.Fprintln(0x15d6e80, 0xc420102020, 0xc42003dd88, 0x1, 0x1, 0x37, 0x0, 0x0)
	/usr/local/go/src/fmt/print.go:248 +0x8b
main.reportError(0x15d85c0, 0xc420106b00)
	/go/src/cli/main.go:240 +0xbf
main.main()
	/go/src/cli/main.go:232 +0x3ea
  • Finally, try to upload with valid mask
$ smartling-cli files push **/*.xml
dir1/dir11/test.xml (xml) new [1 strings 27 words]

This is what i expected before

DoD:
For the first to 2 examples, i would like to see something like There are no files to upload

@dimitrystd dimitrystd added this to the Batch #2 milestone Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant