for sdfcli `importobjects` (or any other command r...
# sdf
d
for sdfcli
importobjects
(or any other command really) is there a way to pass the "Y" confirmation ahead of time so it doesnt require that extra User input?
ultimately I am trying to write a Node script that gets all current xml file names in Objects directory with fs & path and auto imports from account all in one command (currently this "Y" user confirmation step seems to be blocking command going through), if that helps for context or already exists somewhere else
s
doesn't the
update
command already do essentially what you're describing?
m
wouldn’t that be awesome? like if you didn’t have to explicitly provide the list of scriptids?
i did a similar thing in bash a while back, if you’re on some *nix system, you can use the command
yes
ala:
yes Y|sdfcli importobjects -p $PROJECT -authid $AUTHID -type $TYPE -destinationfolder /Objects -scriptid ALL;
it’s definitely not the best choice, but it worked for what i needed.
d
oh if
update
works I might just be dumb 😅 whoops
a
@dbarnett for deploy command there is -sw -np (skip warning, no preview)
For import objects we don't have any flag to by pass input confirmations
And yes update command can update All objects in your local project. You can check help for update command
d
thanks @Ali Syed (NS DevTools QA) looks like update does not require user confirmation on that command so I should be good to go either way :)
m
@Ali Syed (NS DevTools QA) can you point to the specific formatting/documentation that allows
update
to do all objects in a project without having to specify scriptids? omitting -scriptid doesn’t work and ALL(all/All) doesn’t work in my experience. online documentation says -scriptid is required and doesn’t make any mention (that i can see) of support for all (same for command line help) the same actually seems to hold true for
object:update
in suitecloud
d
@mtsb I was running into this as well originally, but noticed there is an <a> keypress option to toggle all , on Node CLI at least
m
ah, so only in node and only in interactive mode then?
d
I think, I did not notice an equivalent ALL option in the Java CLI version docs
@Ali Syed (NS DevTools QA) when doing
update
command, worked great, but my git version control shows the file as Modified even though the file contents look identical. I was thinking it was CR LF endofline characters, but it does not appear to be due to that; any idea what might be causing this?
a
Update commands doest calculate the changes and apply the diff, it just basically get whatever is in the account and overwrite the local file, so thats why maybe git is marking file as changed.
d
@Ali Syed (NS DevTools QA) yes, I was just having trouble identifying why it thinks something has changed and thought maybe the overwrite might have a hidden character or encoding something differently coming from the account perhaps. when running
git diff
I get "warning: LF will be replaced by CRLF in /Objects/.../custobject.xml. The file will have its original line endings in your working directory"
upon closer inspection, it looks like the CRLF actually was the cause (my local project has CRLF and account update brought in only LF) given this, would it be possible by the tool to assess the endofline used locally and use that right before overwriting perhaps?
a
I can definitely make note of it and discuss with the team. If it's possible we will definitely work on it. But it might not be immediate. Thanks for providing a good example.
d
@Ali Syed (NS DevTools QA) thanks for the quick response! appears locally this can be handled somewhat by using a .gitattributes file to specify eol by filetype which I will look into for the meantime (assuming XML will just always be LF eol style from account) I did also try the Download XML directly from netsuite account and got the same LF diffs, I think I just never noticed it before because I always had a legitimate diff previously and git just resolved all the LF to CRLF automatically.