@@ -20,7 +20,6 @@ export const configFileLabel = 'devcontainer.config_file';
2020export async function openDockerfileDevContainer ( params : DockerResolverParameters , configWithRaw : SubstitutedConfig < DevContainerFromDockerfileConfig | DevContainerFromImageConfig > , workspaceConfig : WorkspaceConfiguration , idLabels : string [ ] , additionalFeatures : Record < string , string | boolean | Record < string , string | boolean > > ) : Promise < ResolverResult > {
2121 const { common } = params ;
2222 const { config } = configWithRaw ;
23- // let collapsedFeaturesConfig: () => Promise<CollapsedFeaturesConfig | undefined>;
2423
2524 let container : ContainerDetails | undefined ;
2625 let containerProperties : ContainerProperties | undefined ;
@@ -30,14 +29,7 @@ export async function openDockerfileDevContainer(params: DockerResolverParameter
3029 let imageMetadata : ImageMetadataEntry [ ] ;
3130 let mergedConfig : MergedDevContainerConfig ;
3231 if ( container ) {
33- // let _collapsedFeatureConfig: Promise<CollapsedFeaturesConfig | undefined>;
34- // collapsedFeaturesConfig = async () => {
35- // return _collapsedFeatureConfig || (_collapsedFeatureConfig = (async () => {
36- // const allLabels = container?.Config.Labels || {};
37- // const featuresConfig = await generateFeaturesConfig(params.common, (await createFeaturesTempFolder(params.common)), config, async () => allLabels, getContainerFeaturesFolder);
38- // return collapseFeaturesConfig(featuresConfig);
39- // })());
40- // };
32+
4133 await startExistingContainer ( params , idLabels , container ) ;
4234 imageMetadata = getImageMetadataFromContainer ( container , configWithRaw , undefined , idLabels , common . output ) . config ;
4335 mergedConfig = mergeConfiguration ( config , imageMetadata ) ;
@@ -47,9 +39,6 @@ export async function openDockerfileDevContainer(params: DockerResolverParameter
4739 mergedConfig = mergeConfiguration ( config , imageMetadata ) ;
4840 const { containerUser } = mergedConfig ;
4941 const updatedImageName = await updateRemoteUserUID ( params , mergedConfig , res . updatedImageName [ 0 ] , res . imageDetails , findUserArg ( config . runArgs ) || containerUser ) ;
50-
51- // collapsedFeaturesConfig = async () => res.collapsedFeaturesConfig;
52-
5342 try {
5443 await spawnDevContainer ( params , config , mergedConfig , updatedImageName , idLabels , workspaceConfig . workspaceMount , workspaceConfig . additionalMountString , res . imageDetails , containerUser , res . labels || { } ) ;
5544 } finally {
@@ -290,7 +279,7 @@ export function findUserArg(runArgs: string[] = []) {
290279 return runArgs [ i + 1 ] ;
291280 }
292281 if ( runArg . startsWith ( '-u=' ) || runArg . startsWith ( '--user=' ) ) {
293- return runArg . substr ( runArg . indexOf ( '=' ) + 1 ) ;
282+ return runArg . slice ( runArg . indexOf ( '=' ) + 1 ) ;
294283 }
295284 }
296285 return undefined ;
0 commit comments