Skip to content

Commit

Permalink
Pull out debug statements.
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Promislow <[email protected]>
  • Loading branch information
ericpromislow committed Apr 28, 2023
1 parent ccbb39c commit 0133e77
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ async function installInRegistry(regFileContents: string) {

await fs.promises.writeFile(regFilePath, BOM + regFileContents, { encoding: 'latin1' });
try {
const result = await spawnFile('reg', ['IMPORT', regFilePath]);

console.log(`QQQ: reg import => ${ JSON.stringify(result) }`);
await spawnFile('reg', ['IMPORT', regFilePath]);
} catch (ex: any) {
expect(ex).toMatchObject({});
throw ex;
Expand Down
7 changes: 0 additions & 7 deletions pkg/rancher-desktop/main/deploymentProfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,6 @@ function readRegistryUsingSchema(schemaObj: Record<string, any>, regKey: nativeR
const specialObjectKeys: Array<string[]> = [];
let regValue: any;

console.log(`QQQ: schemaKeys: ${ schemaKeys.join(', ') }, parent pathParts: ${ pathParts.join('.') }`);
console.log(`QQQ: raw registryKeys: ${ registryKeys.join(', ') }`);
console.log(`QQQ: registryKeysFixedCase: ${ registryKeysFixedCase.join(', ') }`);
registryKeysFixedCase.forEach((key, index) => {
const originalKey = registryKeys[index];

Expand All @@ -234,8 +231,6 @@ function readRegistryUsingSchema(schemaObj: Record<string, any>, regKey: nativeR
if (unknownKeys.length) {
console.log(`Unrecognized keys in registry at \\${ pathParts.join('\\') }: [${ unknownKeys.join(', ') }]`);
}
console.log(`QQQ: specialObjectKeys: [${ specialObjectKeys.join('], [') }]`);
console.log(`QQQ: commonKeys: [${ commonKeys.join('], [') }]`);

// First process the nested keys, then process any values
for (const [schemaKey, registryKey] of commonKeys) {
Expand Down Expand Up @@ -283,7 +278,6 @@ function readRegistryUsingSchema(schemaObj: Record<string, any>, regKey: nativeR
const registryValueNames = nativeReg.enumValueNames(regKey);
const registryValueNamesFixedCase = registryValueNames.map(k => fixProfileKeyCase(k, schemaKeys, schemaKeysLowerCase));

console.log(`QQQ: registryValueNamesFixedCase: ${ registryValueNamesFixedCase.join(', ') }`);
registryValueNamesFixedCase.forEach((key, index) => {
const originalName = registryValueNames[index];

Expand Down Expand Up @@ -366,7 +360,6 @@ function readRegistryValue(schemaVal: any, regKey: nativeReg.HKEY, pathParts: st
if (!rawValue) {
return null;
}
console.log(`QQQ: readRegistryValue: ${ pathParts.join('.') }.${ valueName }: raw type is ${ valueTypeNames[rawValue.type] }`);
switch (rawValue.type) {
case nativeReg.ValueType.SZ:
if (schemaVal === undefined || typeof schemaVal === 'string') {
Expand Down

0 comments on commit 0133e77

Please sign in to comment.