forked from toolshed/abra
refactor: less quotes
This commit is contained in:
@ -41,7 +41,7 @@ var appBackupCommand = &cli.Command{
|
||||
abraSh := path.Join(config.ABRA_DIR, "apps", app.Type, "abra.sh")
|
||||
if _, err := os.Stat(abraSh); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
logrus.Fatalf("'%s' does not exist?", abraSh)
|
||||
logrus.Fatalf("%s does not exist?", abraSh)
|
||||
}
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
@ -62,7 +62,7 @@ var appBackupCommand = &cli.Command{
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
if !strings.Contains(string(bytes), execCmd) {
|
||||
logrus.Fatalf("%s doesn't have a '%s' function", app.Type, execCmd)
|
||||
logrus.Fatalf("%s doesn't have a %s function", app.Type, execCmd)
|
||||
}
|
||||
|
||||
sourceAndExec := fmt.Sprintf("%s; %s", sourceCmd, execCmd)
|
||||
|
@ -23,7 +23,7 @@ var appCheckCommand = &cli.Command{
|
||||
envSamplePath := path.Join(config.ABRA_DIR, "apps", app.Type, ".env.sample")
|
||||
if _, err := os.Stat(envSamplePath); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
logrus.Fatalf("'%s' does not exist?", envSamplePath)
|
||||
logrus.Fatalf("%s does not exist?", envSamplePath)
|
||||
}
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
@ -45,7 +45,7 @@ var appCheckCommand = &cli.Command{
|
||||
logrus.Fatalf("%s is missing %s", app.Path, missingEnvVars)
|
||||
}
|
||||
|
||||
logrus.Infof("all necessary environment variables defined for '%s'", app.Name)
|
||||
logrus.Infof("all necessary environment variables defined for %s", app.Name)
|
||||
|
||||
return nil
|
||||
},
|
||||
|
@ -31,7 +31,7 @@ var appConfigCommand = &cli.Command{
|
||||
|
||||
appFile, exists := files[appName]
|
||||
if !exists {
|
||||
logrus.Fatalf("cannot find app with name '%s'", appName)
|
||||
logrus.Fatalf("cannot find app with name %s", appName)
|
||||
}
|
||||
|
||||
ed, ok := os.LookupEnv("EDITOR")
|
||||
|
@ -60,7 +60,7 @@ var appRemoveCommand = &cli.Command{
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
if isDeployed {
|
||||
logrus.Fatalf("'%s' is still deployed. Run \"abra app undeploy %s \" or pass --force", app.Name, app.Name)
|
||||
logrus.Fatalf("%s is still deployed. Run \"abra app undeploy %s \" or pass --force", app.Name, app.Name)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ var appRestoreCommand = &cli.Command{
|
||||
abraSh := path.Join(config.ABRA_DIR, "apps", app.Type, "abra.sh")
|
||||
if _, err := os.Stat(abraSh); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
logrus.Fatalf("'%s' does not exist?", abraSh)
|
||||
logrus.Fatalf("%s does not exist?", abraSh)
|
||||
}
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
@ -60,7 +60,7 @@ var appRestoreCommand = &cli.Command{
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
if !strings.Contains(string(bytes), execCmd) {
|
||||
logrus.Fatalf("%s doesn't have a '%s' function", app.Type, execCmd)
|
||||
logrus.Fatalf("%s doesn't have a %s function", app.Type, execCmd)
|
||||
}
|
||||
|
||||
backupFile := c.Args().Get(2)
|
||||
|
@ -50,7 +50,7 @@ recipes.
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
logrus.Debugf("checking whether '%s' is already deployed", stackName)
|
||||
logrus.Debugf("checking whether %s is already deployed", stackName)
|
||||
|
||||
isDeployed, deployedVersion, err := stack.IsDeployed(c.Context, cl, stackName)
|
||||
if err != nil {
|
||||
@ -58,7 +58,7 @@ recipes.
|
||||
}
|
||||
|
||||
if !isDeployed {
|
||||
logrus.Fatalf("'%s' is not deployed?", app.Name)
|
||||
logrus.Fatalf("%s is not deployed?", app.Name)
|
||||
}
|
||||
|
||||
catl, err := catalogue.ReadRecipeCatalogue()
|
||||
@ -75,7 +75,7 @@ recipes.
|
||||
if deployedVersion == "" {
|
||||
deployedVersion = "unknown"
|
||||
availableDowngrades = versions
|
||||
logrus.Warnf("failed to determine version of deployed '%s'", app.Name)
|
||||
logrus.Warnf("failed to determine version of deployed %s", app.Name)
|
||||
}
|
||||
|
||||
if deployedVersion != "unknown" && !internal.Chaos {
|
||||
@ -108,10 +108,10 @@ recipes.
|
||||
if !internal.Chaos {
|
||||
if internal.Force {
|
||||
chosenDowngrade = availableDowngrades[0]
|
||||
logrus.Debugf("choosing '%s' as version to downgrade to (--force)", chosenDowngrade)
|
||||
logrus.Debugf("choosing %s as version to downgrade to (--force)", chosenDowngrade)
|
||||
} else {
|
||||
prompt := &survey.Select{
|
||||
Message: fmt.Sprintf("Please select a downgrade (current version: '%s'):", deployedVersion),
|
||||
Message: fmt.Sprintf("Please select a downgrade (current version: %s):", deployedVersion),
|
||||
Options: availableDowngrades,
|
||||
}
|
||||
if err := survey.AskOne(prompt, &chosenDowngrade); err != nil {
|
||||
|
@ -60,7 +60,7 @@ var appSecretGenerateCommand = &cli.Command{
|
||||
}
|
||||
}
|
||||
if !matches {
|
||||
logrus.Fatalf("'%s' doesn't exist in the env config?", secretName)
|
||||
logrus.Fatalf("%s doesn't exist in the env config?", secretName)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ volumes as eligiblef or pruning once undeployed.
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
logrus.Debugf("checking whether '%s' is already deployed", stackName)
|
||||
logrus.Debugf("checking whether %s is already deployed", stackName)
|
||||
|
||||
isDeployed, deployedVersion, err := stack.IsDeployed(c.Context, cl, stackName)
|
||||
if err != nil {
|
||||
@ -35,7 +35,7 @@ volumes as eligiblef or pruning once undeployed.
|
||||
}
|
||||
|
||||
if !isDeployed {
|
||||
logrus.Fatalf("'%s' is not deployed?", stackName)
|
||||
logrus.Fatalf("%s is not deployed?", stackName)
|
||||
}
|
||||
|
||||
if err := internal.DeployOverview(app, deployedVersion, "continue with undeploy?"); err != nil {
|
||||
|
@ -142,7 +142,7 @@ A new catalogue copy can be published to the recipes repository by passing the
|
||||
}
|
||||
|
||||
if !isClean {
|
||||
logrus.Fatalf("'%s' has locally unstaged changes", rm.Name)
|
||||
logrus.Fatalf("%s has locally unstaged changes", rm.Name)
|
||||
}
|
||||
|
||||
if err := gitPkg.EnsureUpToDate(recipeDir); err != nil {
|
||||
|
@ -85,7 +85,7 @@ convenient command-line experience. See "abra autocomplete -h" for more.
|
||||
}
|
||||
}
|
||||
|
||||
logrus.Debugf("abra version '%s', commit '%s'", version, commit)
|
||||
logrus.Debugf("abra version %s, commit %s", version, commit)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ var recipeVersionCommand = &cli.Command{
|
||||
|
||||
recipeMeta, ok := catalogue[recipe.Name]
|
||||
if !ok {
|
||||
logrus.Fatalf("'%s' recipe doesn't exist?", recipe.Name)
|
||||
logrus.Fatalf("%s recipe doesn't exist?", recipe.Name)
|
||||
}
|
||||
|
||||
tableCol := []string{"Version", "Service", "Image", "Tag", "Digest"}
|
||||
|
@ -46,7 +46,7 @@ are listed. This zone must already be created on your provider account.
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
default:
|
||||
logrus.Fatalf("'%s' is not a supported DNS provider", internal.DNSProvider)
|
||||
logrus.Fatalf("%s is not a supported DNS provider", internal.DNSProvider)
|
||||
}
|
||||
|
||||
records, err := provider.GetRecords(c.Context, zone)
|
||||
|
@ -59,7 +59,7 @@ You may also invoke this command in "wizard" mode and be prompted for input
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
default:
|
||||
logrus.Fatalf("'%s' is not a supported DNS provider", internal.DNSProvider)
|
||||
logrus.Fatalf("%s is not a supported DNS provider", internal.DNSProvider)
|
||||
}
|
||||
|
||||
if err := internal.EnsureDNSTypeFlag(c); err != nil {
|
||||
|
@ -168,7 +168,7 @@ like tears in rain.
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
logrus.Infof("server at '%s' has been lost in time, like tears in rain", serverName)
|
||||
logrus.Infof("server at %s has been lost in time, like tears in rain", serverName)
|
||||
|
||||
return nil
|
||||
},
|
||||
|
@ -33,7 +33,7 @@ testing efforts!
|
||||
cmd = exec.Command("bash", "-c", fmt.Sprintf("curl -s %s | bash -s -- --rc", releaseCandidateURL))
|
||||
}
|
||||
|
||||
logrus.Debugf("attempting to run '%s'", cmd)
|
||||
logrus.Debugf("attempting to run %s", cmd)
|
||||
|
||||
if err := internal.RunCmd(cmd); err != nil {
|
||||
logrus.Fatal(err)
|
||||
|
Reference in New Issue
Block a user