goss-org / goss

Quick and Easy server testing/validation
https://goss.rocks
Apache License 2.0
5.53k stars 470 forks source link

kgoss - error: open .: is a directory #770

Closed gaganyaan2 closed 2 years ago

gaganyaan2 commented 2 years ago

Describe the bug

kgoss it does not copy the goss.yaml back to local directory

error: open .: is a directory

How To Reproduce

[root@home ~]# kgoss edit -i nginx
[INFO]: Parsing command line
[INFO]: using image: nginx
[INFO]: going to execute (may be blank): -- 
[INFO]: Preparing files to copy into container
[INFO]: Creating Kubernetes pod/container to test
++ /usr/local/bin/kubectl run kgoss-tester-17296 --image-pull-policy=Always --restart=Never --labels=app=kgoss-test '--output=jsonpath={.metadata.name}' --image=nginx --
+ id=kgoss-tester-17296
+ set +x
[INFO]: Waiting for container to be ready
pod/kgoss-tester-17296 condition met
[INFO]: Copying goss files into pod/container
[INFO]: Marking copied files as executable
[INFO]: Using pod/container: kgoss-tester-17296
[INFO]: When prompt appears you can run `goss add` to add resources
# goss a port 80
Adding Port to './goss.yaml':

tcp:80:
  listening: true
  ip:
  - 0.0.0.0

# 
Copying goss.yaml and goss_wait.yaml files back to local dir
[INFO]: Copied 'goss.yaml' from pod/container to '.'
tar: Removing leading `/' from member names
error: open .: is a directory
[INFO]: Deleting pod/container

Expected Behavior

Should copy the goss.yaml back to local directory as it does in dgoss

Actual Behavior

Environment: