diff --git a/pkg/cmd/cli/cmd/set/env.go b/pkg/cmd/cli/cmd/set/env.go
index <HASH>..<HASH> 100644
--- a/pkg/cmd/cli/cmd/set/env.go
+++ b/pkg/cmd/cli/cmd/set/env.go
@@ -329,7 +329,7 @@ func RunEnv(f *clientcmd.Factory, in io.Reader, out, errout io.Writer, cmd *cobr
 	}
 
 	mapper, typer := f.Object()
-	b := resource.NewBuilder(mapper, typer, resource.ClientMapperFunc(f.ClientForMapping), kapi.Codecs.UniversalDecoder()).
+	b := resource.NewBuilder(mapper, typer, resource.ClientMapperFunc(f.ClientForMapping), f.Decoder(false)).
 		ContinueOnError().
 		NamespaceParam(cmdNamespace).DefaultNamespace().
 		FilenameParam(explicit, &resource.FilenameOptions{Recursive: false, Filenames: filenames}).
fix: versioned objects in 'oc set env' by default