File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -437,11 +437,8 @@ func generateTemplateData(changesets []changeset) (templateData) {
437437
438438 // add env variables
439439 for _ , e := range os .Environ () {
440- pair := strings .Split (e , "=" )
441-
442- envKey := pair [0 ]
443- envValue := strings .Join (pair [1 :], "=" )
444-
440+ split := strings .SplitN (e , "=" , 2 )
441+ envKey , envValue := split [0 ], split [1 ]
445442 ret .Env [envKey ] = envValue
446443 }
447444
@@ -593,10 +590,10 @@ func buildFileitems(args []string) ([]fileitem) {
593590 file .Output = strings .TrimSuffix (file .Output , opts .OutputStripFileExt )
594591 } else if strings .Contains (filepath , ":" ) {
595592 // argument like "source:destination"
596- pair := strings .Split (filepath , ":" )
593+ split := strings .SplitN (filepath , ":" , 2 )
597594
598- file .Path = pair [0 ]
599- file .Output = pair [1 ]
595+ file .Path = split [0 ]
596+ file .Output = split [1 ]
600597 }
601598
602599 fileitems = append (fileitems , file )
You can’t perform that action at this time.
0 commit comments