Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Feature request: possibility to disable node not found warning #176

Open
jakobharder opened this issue Nov 5, 2022 · 0 comments
Open

Feature request: possibility to disable node not found warning #176

jakobharder opened this issue Nov 5, 2022 · 0 comments

Comments

@jakobharder
Copy link
Contributor

With increasing mod compatibility efforts there, my ModOps get complex only because I want to supress not found warnings.

In the following example I add a product to storage lists, but only if it's not added already (shared product).
So, not finding a storage list where the product is missing is an expected scenario and should not lead to a warning.

To avoid it I create a fake fallback Asset so that at least one list is always found, and remove that Asset later.

  <!-- create fallback container to avoid warnings in case the product is already available -->
  <ModOp Type="addNextSibling" GUID="120055">
    <Asset>
      <Template>fallback</Template>
      <Values>
        <Standard>
          <GUID>1500010221</GUID>
        </Standard>
        <ProductStorageList>
          <ProductList>
            <Item />
          </ProductList>
        </ProductStorageList>
      </Values>
    </Asset>
  </ModOp>
  <!-- StandardProductList,StandardMarketplaceModerateStorageList: after bricks -->
  <ModOp Type="addNextSibling" GUID="120055,120057" Path="/Values/ProductStorageList/ProductList/Item[Product='1010205' and not(../Item/Product='1500010825')] | //Values[Standard/GUID='1500010221']/ProductStorageList/ProductList/Item[last()]">
    <Item>
      <Product>1500010825</Product>
    </Item>
  </ModOp>
  <ModOp Type="remove" GUID="1500010221" />

The code would be a lot simpler, if we had a flag like disableNotFoundWarning I can set individually per ModOp.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant