-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improving error messages, updating .gitignore and README second
Signed-off-by: Andrew Steurer <[email protected]>
- Loading branch information
Andrew Steurer
committed
Aug 16, 2024
1 parent
788df9d
commit 9dce449
Showing
7 changed files
with
44 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
otel-plugin | ||
otel | ||
otel | ||
*.json | ||
*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,9 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"os/exec" | ||
|
||
"github.com/fermyon/otel-plugin/cmd" | ||
) | ||
|
||
func main() { | ||
if err := checkDependencies(); err != nil { | ||
fmt.Fprintln(os.Stderr, err) | ||
os.Exit(1) | ||
} | ||
|
||
cmd.Execute() | ||
} | ||
|
||
func checkDependencies() error { | ||
cmd := exec.Command("docker", "--version") | ||
if err := cmd.Run(); err != nil { | ||
return fmt.Errorf("docker appears not to be installed, so please visit their install page and try again once installed: https://www.docker.com/products/docker-desktop/") | ||
} | ||
|
||
cmd = exec.Command("docker", "info") | ||
if err := cmd.Run(); err != nil { | ||
return fmt.Errorf("the docker daemon appears not to be running, so please start the daemon and try again") | ||
} | ||
|
||
return nil | ||
} |