Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Create parent directory for env file #67

Merged
merged 1 commit into from
Jul 14, 2022

Conversation

farshidtz
Copy link
Member

Fixes #62

@MonicaisHer
Copy link
Contributor

I tested device-onvif-camera with this PR's hook and disabled install hook.

I dont get .env.tmp: no such file or directory error from configure hook anymore, but there is no .env file has been created after I set a snap option:

$ sudo snap install edgex-device-onvif-camera_0.0.1-dev.20_amd64.snap --dangerous
edgex-device-onvif-camera 0.0.1-dev.20 installed
$ sudo snap set edgex-device-onvif-camera configs.writable-loglevel=DEBUG
$ sudo snap start edgex-device-onvif-camera.device-onvif-camera 
Started.
/var/snap/edgex-device-onvif-camera$ tree
.
├── common
├── current -> x1
└── x1

3 directories, 0 files

@farshidtz
Copy link
Member Author

farshidtz commented Jul 14, 2022

configs.writable-loglevel=DEBUG -> config.writable-loglevel=DEBUG?

@MonicaisHer
Copy link
Contributor

configs.writable-loglevel=DEBUG -> config.writable-loglevel=DEBUG?

It works!

/var/snap/edgex-device-onvif-camera
├── common
├── current -> x1
└── x1
    └── config
        └── device-onvif-camera
            └── res
                └── device-onvif-camera.env
$ cat device-onvif-camera.env 
WRITABLE_LOGLEVEL="DEBUG"

Copy link
Contributor

@MonicaisHer MonicaisHer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@farshidtz Thanks for the changes!

@farshidtz farshidtz merged commit 32a1f3e into canonical:main Jul 14, 2022
@farshidtz farshidtz deleted the env-mkdir branch July 14, 2022 15:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail to write temp env file because of missing directory
2 participants