Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
andriisoldatenko committed Dec 23, 2020
1 parent 05373e9 commit 8f919bd
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions cmd/airflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,24 +391,14 @@ func airflowRun(cmd *cobra.Command, args []string) error {
return airflow.Run(config.WorkingPath, args, "")
}

// airflowUpgradeCheck
func airflowUpgradeCheck(cmd *cobra.Command, args []string) error {
// Silence Usage as we have now validated command input
cmd.SilenceUsage = true

// Add airflow command, to simplify astro cli usage
args = append([]string{"bash", "-c", "pip install --no-deps 'apache-airflow-upgrade-check'; airflow upgrade_check"})
return airflow.Run(config.WorkingPath, args, "root")
}

// airflowUpgradeCheck
func airflowUpgradeCheck(cmd *cobra.Command, args []string) error {
// Silence Usage as we have now validated command input
cmd.SilenceUsage = true

// Add airflow command, to simplify astro cli usage
args = append([]string{"bash", "-c", "pip install --no-deps 'apache-airflow-upgrade-check'; python -c 'from packaging.version import Version\nfrom airflow import __version__\nif Version(__version__) < Version(\"1.10.14\"):\n print(\"Please upgrade your image to Airflow 1.10.14 first, then try again.\");exit(1)\nelse:\n from airflow.upgrade.checker import __main__;__main__()'"})
return airflow.Run(config.WorkingPath, args)
return airflow.Run(config.WorkingPath, args, "")
}

func acceptableVersion(a string, list []string) bool {
Expand Down

0 comments on commit 8f919bd

Please sign in to comment.