Fix local CSR lookup
Summary: From what I can tell, `idb file pull` seems to behave slightly differently for simulators. When pulling from a remote simulator, it appears to first create a directory for the local destination causing the read in line 508 to as it is trying to read the *folder* `app.csr` not `app.csr/app.csr`. By omitting the destination file name, we avoid this behaviour. Reviewed By: fabiomassimo Differential Revision: D30541778 fbshipit-source-id: 851398aed5fd350a68ba0686707ce0f0aa09672c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e14f3b2368
commit
89d7e17c26
@@ -489,13 +489,7 @@ export default class CertificateProvider {
|
||||
return tmpDir({unsafeCleanup: true})
|
||||
.then((dir) => {
|
||||
return iosUtil
|
||||
.pull(
|
||||
deviceId,
|
||||
originalFile,
|
||||
bundleId,
|
||||
path.join(dir, csrFileName),
|
||||
this.config.idbPath,
|
||||
)
|
||||
.pull(deviceId, originalFile, bundleId, dir, this.config.idbPath)
|
||||
.then(() => dir);
|
||||
})
|
||||
.then((dir) => {
|
||||
@@ -512,6 +506,7 @@ export default class CertificateProvider {
|
||||
})
|
||||
.then((fileName) => {
|
||||
const copiedFile = path.resolve(dir, fileName);
|
||||
console.debug('Trying to read CSR from', copiedFile);
|
||||
return fs
|
||||
.readFile(copiedFile)
|
||||
.then((data) => this.santitizeString(data.toString()));
|
||||
|
||||
Reference in New Issue
Block a user