@@ -43,7 +43,7 @@ Get by Project
4343 } else if resultCount == 1 {
4444 // Print the single result
4545 if exportPath != "" {
46- exportVariable (response [0 ], exportFile )
46+ exportVariable (response [0 ], exportPath )
4747 }
4848 PrettyPrint (response [0 ])
4949 } else {
@@ -52,7 +52,7 @@ Get by Project
5252 table .SetHeader ([]string {"Id" , "Name" , "Project" , "Type" , "Description" })
5353 for _ , c := range response {
5454 if exportPath != "" {
55- exportVariable (c , exportFile )
55+ exportVariable (c , exportPath )
5656 }
5757 table .Append ([]string {c .ID , c .Name , c .Project , c .Type , c .Description })
5858 }
@@ -71,8 +71,8 @@ var createVariableCmd = &cobra.Command{
7171 log .Fatalln (err )
7272 }
7373
74- if importFile != "" { // If we are importing a file
75- variables := importVariables (importFile )
74+ if importPath != "" { // If we are importing a file
75+ variables := importVariables (importPath )
7676 for _ , value := range variables {
7777 if project != "" { // If the project is specified update the object
7878 value .Project = project
@@ -104,8 +104,8 @@ var updateVariableCmd = &cobra.Command{
104104 log .Fatalln (err )
105105 }
106106
107- if importFile != "" { // If we are importing a file
108- variables := importVariables (importFile )
107+ if importPath != "" { // If we are importing a file
108+ variables := importVariables (importPath )
109109 for _ , value := range variables {
110110 exisitingVariable , err := getVariable ("" , value .Name , value .Project )
111111 if err != nil {
@@ -161,7 +161,7 @@ func init() {
161161 createVariableCmd .Flags ().StringVarP (& project , "project" , "p" , "" , "The project in which to create the variable" )
162162 createVariableCmd .Flags ().StringVarP (& value , "value" , "v" , "" , "The value of the variable to create" )
163163 createVariableCmd .Flags ().StringVarP (& description , "description" , "d" , "" , "The description of the variable to create" )
164- createVariableCmd .Flags ().StringVarP (& importFile , "importfile " , "i" , "" , "Path to a YAML file with the variables to import" )
164+ createVariableCmd .Flags ().StringVarP (& importPath , "importpath " , "i" , "" , "Path to a YAML file with the variables to import" )
165165
166166 // Update Variable
167167 updateCmd .AddCommand (updateVariableCmd )
@@ -170,7 +170,7 @@ func init() {
170170 updateVariableCmd .Flags ().StringVarP (& typename , "type" , "t" , "" , "Update the type of the variable REGULAR|SECRET|RESTRICTED" )
171171 updateVariableCmd .Flags ().StringVarP (& value , "value" , "v" , "" , "Update the value of the variable " )
172172 updateVariableCmd .Flags ().StringVarP (& description , "description" , "d" , "" , "Update the description of the variable" )
173- updateVariableCmd .Flags ().StringVarP (& importFile , "importfile " , "" , "" , "Path to a YAML file with the variables to import" )
173+ updateVariableCmd .Flags ().StringVarP (& importPath , "importpath " , "" , "" , "Path to a YAML file with the variables to import" )
174174 //updateVariableCmd.MarkFlagRequired("id")
175175 // Delete Variable
176176 deleteCmd .AddCommand (deleteVariableCmd )
0 commit comments