Skip to content

sfdx texei:picklist:unrestrict working only on /force-app/main/default/objects #134

@nabondance

Description

@nabondance

Hello,

When running sfdx texei:picklist:unrestrict it crash if the project tree isn't the default one:

├── force-app
│   └── main
│       └── default
│           ├── classes
│           ├── objects
│           │   └── Account
│           │       └── fields
│           │           └── picklistOk__c.field-meta.xml
│           └── triggers

When working with packages, the project tree looks like that and it doesn't work:

├── package1
│   └── main
│       └── default
│           ├── classes
│           ├── objects
│           │   └── Account
│           │       └── fields
│           │           └── picklist1__c.field-meta.xml
│           └── triggers
├── package2
│   └── main
│       └── default
│           ├── classes
│           ├── objects
│           │   └── Account
│           │       └── fields
│           │           └── picklist2__c.field-meta.xml
│           └── triggers

Command:

sfdx texei:picklist:unrestrict --json

Error message:

{
  "status": 1,
  "name": "Error",
  "message": "ENOENT: no such file or directory, scandir '/Users/username/Git/BasicSfdx/force-app/main/default/objects'",
  "exitCode": 1,
  "commandName": "Unrestrict",
  "stack": "Error: ENOENT: no such file or directory, scandir '/Users/username/Git/BasicSfdx/force-app/main/default/objects'\nOuter stack:\n    at SfdxError.wrap (/Users/username/Git/Salesforce/node_modules/texei-sfdx-plugin/node_modules/@salesforce/core/lib/sfdxError.js:171:27)\n    at Unrestrict.catch (/Users/username/Git/Salesforce/node_modules/texei-sfdx-plugin/node_modules/@salesforce/command/lib/sfdxCommand.js:248:67)\n    at async Unrestrict._run (/Users/username/Git/Salesforce/node_modules/texei-sfdx-plugin/node_modules/@salesforce/command/lib/sfdxCommand.js:85:13)\n    at async Config.runCommand (/Users/username/Git/BasicSfdx/node_modules/sfdx-cli/node_modules/@oclif/core/lib/config/config.js:329:25)\n    at async run (/Users/username/Git/BasicSfdx/node_modules/sfdx-cli/node_modules/@oclif/core/lib/main.js:89:16)",
  "warnings": []
}

Because sfdx texei:picklist:unrestrict doesn't work, sfdx texei:picklist:restrict cannot work because we don't have the generated json.

versions:
node: 20.5.1
npm: 9.8.0
sfdx-cli 7.209.6
texei-sfdx-plugin 1.17.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions