From 466fb4ac109368162c658f308cd7e94d4de4405a Mon Sep 17 00:00:00 2001 From: Tom Graham Date: Wed, 18 Jan 2017 10:59:52 +0000 Subject: [PATCH] Allows the manifest file to be missing. This is so that older packages that do not yet use `meteor package` will still work. --- src/Patch/Manifest/ManifestChecker.php | 2 +- tests/Patch/Manifest/ManifestCheckerTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Patch/Manifest/ManifestChecker.php b/src/Patch/Manifest/ManifestChecker.php index ca12eaa1..5e62bef6 100644 --- a/src/Patch/Manifest/ManifestChecker.php +++ b/src/Patch/Manifest/ManifestChecker.php @@ -29,7 +29,7 @@ public function check($workingDir) $manifestFile = $workingDir . '/' . self::MANIFEST_FILENAME; if (!file_exists($manifestFile)) { // The manifest did not exist - return false; + return true; } $manifest = json_decode(file_get_contents($manifestFile), true); diff --git a/tests/Patch/Manifest/ManifestCheckerTest.php b/tests/Patch/Manifest/ManifestCheckerTest.php index f5bcaead..1b76f7c1 100644 --- a/tests/Patch/Manifest/ManifestCheckerTest.php +++ b/tests/Patch/Manifest/ManifestCheckerTest.php @@ -20,9 +20,9 @@ public function setUp() ]); } - public function testReturnsFalseIfManifestFileDoesNotExist() + public function testReturnsTrueIfManifestFileDoesNotExist() { - $this->assertFalse($this->manifestChecker->check(vfsStream::url('root'))); + $this->assertTrue($this->manifestChecker->check(vfsStream::url('root'))); } public function testReturnsFalseIfManifestFileCouldNotBeParsed()