Skip to content

Commit

Permalink
build(snap): Revert interface check, error logging and xtrace
Browse files Browse the repository at this point in the history
Signed-off-by: Mengyi Wang <[email protected]>
  • Loading branch information
MonicaisHer committed Apr 26, 2023
1 parent 1643916 commit 8449c7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 2 additions & 9 deletions snap/local/helper-go/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,8 @@ func install() {

var err error

// Install default config files only if no config provider is connected
isConnected, err := snapctl.IsConnected("edgex-config").Run()
if err != nil {
log.Fatalf("Error checking interface connection: %s", err)
}
if !isConnected {
if err = installConfFiles(); err != nil {
log.Fatalf("Error installing config files: %v", err)
}
if err = installConfFiles(); err != nil {
log.Fatalf("Error installing config files: %v", err)
}

if err = installSecretStore(); err != nil {
Expand Down
4 changes: 3 additions & 1 deletion snap/local/runtime-helpers/bin/source-env-file.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/bin/bash -e

# convert cmdline to string array
ARGV=($@)
Expand All @@ -16,6 +16,8 @@ if [ -f "$ENV_FILE" ]; then
set -o allexport
source "$ENV_FILE" set
set +o allexport
else
logger --tag=$TAG --stderr "sourcing $ENV_FILE: not found!"
fi

exec "$@"
Expand Down

0 comments on commit 8449c7e

Please sign in to comment.