github.com/LukasHeimann/cloudfoundrycli@v7.1.0+incompatible/actor/v7pushaction/handle_task_override.go (about)

     1  package v7pushaction
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/command/translatableerror"
     5  	"code.cloudfoundry.org/cli/util/manifestparser"
     6  )
     7  
     8  func HandleTaskOverride(manifest manifestparser.Manifest, overrides FlagOverrides) (manifestparser.Manifest, error) {
     9  	if overrides.Task {
    10  		if manifest.ContainsMultipleApps() {
    11  			return manifest, translatableerror.CommandLineArgsWithMultipleAppsError{}
    12  		}
    13  
    14  		app := manifest.GetFirstApp()
    15  		app.NoRoute = true
    16  	}
    17  
    18  	return manifest, nil
    19  }