From 8c70ade5abb35d804f8db254d0f5fbf58b5e1f72 Mon Sep 17 00:00:00 2001 From: Chester Wood Date: Sat, 11 Dec 2021 14:32:01 -0700 Subject: [PATCH] Warn that postinstall-postinstall runs the hook twice Addresses https://github.com/ds300/postinstall-postinstall/issues/16 --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 2d0856e7..64209bfc 100644 --- a/README.md +++ b/README.md @@ -281,6 +281,11 @@ Yarn only runs the `postinstall` hook after `yarn` and `yarn add`, but not after `yarn remove`. The `postinstall-postinstall` package is used to make sure your `postinstall` hook gets executed even after a `yarn remove`. +Note that `postinstall-postinstall` will run your `postinstall` hook twice if you +are doing a `yarn install`, etc. So if you add your own script to the `postinstall` +hook, it must be idempotent, and you should be aware that the first time it is run, +you will not see console output. + ## License MIT